Add config.sh to configure scaling

This commit is contained in:
Girish Ramakrishnan 2021-09-23 10:43:48 -07:00
parent 1ba882d9e8
commit 9e819b58f6
4 changed files with 7 additions and 4 deletions

View file

@ -49,7 +49,7 @@ RUN ln -sf /run/mastodon/supervisord.log /var/log/supervisor/supervisord.log
RUN ln -fs /app/data/env.production /app/code/.env.production
RUN ln -fs /app/data/system /app/code/public/system
COPY start.sh cleanup.sh env.template /app/pkg/
COPY start.sh cleanup.sh config.sh env.template /app/pkg/
CMD [ "/app/pkg/start.sh" ]

View file

@ -69,6 +69,9 @@ fi
chown -R cloudron:cloudron /app/data /tmp/mastodon /run/mastodon
[[ ! -f /app/data/config.sh ]] && cp /app/pkg/config.sh /app/data/config.sh
source /app/data/config.sh
echo "==> Starting mastodon"
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Mastodon

View file

@ -1,8 +1,8 @@
[program:sidekiq]
priority=10
directory=/app/code
environment=HOME=/app/code,DB_POOL=25,RAILS_ENV=production,MALLOC_ARENA_MAX=2
command=bundle exec sidekiq -c 2 -e production
environment=HOME=/app/code,RAILS_ENV=production,MALLOC_ARENA_MAX=2
command=bundle exec sidekiq -c %(ENV_SIDEKIQ_THREADS)s -e production
user=cloudron
autostart=true
autorestart=true

View file

@ -1,7 +1,7 @@
[program:streaming]
priority=10
directory=/app/code
environment=HOME=/app/code,NODE_ENV=production,PORT=4000,STREAMING_CLUSTER_NUM=1
environment=HOME=/app/code,NODE_ENV=production,PORT=4000
command=node /app/code/streaming
user=cloudron
autostart=true