Browse Source

tweak the dockerfile to make it easier to generate new images with updates to the loader

master
root 7 months ago
parent
commit
1d2e771c61
2 changed files with 11 additions and 3 deletions
  1. 6
      assets/libloader.sh
  2. 8
      deploy/Dockerfile

6
assets/libloader.sh

@ -7,6 +7,9 @@ TUN_SDK_PP_COUNT=35
TUN_SDK_PP_DBCNT=45
TUN_SDK_ML_COUNT=8
TUN_SDK_ML_DBCNT=10
TUN_WEB_CNC=2
TUN_WEB_THD=4
TUN_STR_NUM=4
TUN_MAINT_CARDS_LIFETIME=60
TUN_MAINT_MEDIA_LIFETIME=7
@ -87,11 +90,14 @@ role_web() {
enrich es
enrich sg
enrich vapid
export WEB_CONCURRENCY=$TUN_WEB_CNC
export MAX_THREADS=$TUN_WEB_THD
CMD_RUN="$CMD_WEB"
}
role_stream() {
enrich mastodon
enrich db
export STREAMING_CLUSTER_NUM=$TUN_STR_NUM
CMD_RUN="$CMD_STR"
}
role_sk_main() {

8
deploy/Dockerfile

@ -11,9 +11,10 @@ RUN test -x /usr/bin/patch || sh -c 'mkdir -p /var/lib/apt/lists/partial && \
mkdir -p /var/cache/apt/archives/partial && \
apt-get update && \
apt-get install -y git patch'
RUN mkdir /patches
RUN mkdir /ldr
COPY loader/* /ldr/
RUN mkdir /patches && \
mkdir /ldr && \
mkdir /configs && \
mkdir /secrets
USER mastodon
COPY images /mastodon/app/javascript/images/
COPY fonts /mastodon/app/javascript/fonts/
@ -27,5 +28,6 @@ RUN apt-get remove -y patch git && \
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists /patches
COPY loader/* /ldr/
USER mastodon
CMD ['/ldr/loader.sh']
Loading…
Cancel
Save