mirror of
https://git.cloudron.io/cloudron/mastodon-app.git
synced 2024-12-04 06:16:38 +00:00
Add config.sh to configure scaling
This commit is contained in:
parent
1ba882d9e8
commit
9e819b58f6
4 changed files with 7 additions and 4 deletions
|
@ -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/env.production /app/code/.env.production
|
||||||
RUN ln -fs /app/data/system /app/code/public/system
|
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" ]
|
CMD [ "/app/pkg/start.sh" ]
|
||||||
|
|
||||||
|
|
3
start.sh
3
start.sh
|
@ -69,6 +69,9 @@ fi
|
||||||
|
|
||||||
chown -R cloudron:cloudron /app/data /tmp/mastodon /run/mastodon
|
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"
|
echo "==> Starting mastodon"
|
||||||
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Mastodon
|
exec /usr/bin/supervisord --configuration /etc/supervisor/supervisord.conf --nodaemon -i Mastodon
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
[program:sidekiq]
|
[program:sidekiq]
|
||||||
priority=10
|
priority=10
|
||||||
directory=/app/code
|
directory=/app/code
|
||||||
environment=HOME=/app/code,DB_POOL=25,RAILS_ENV=production,MALLOC_ARENA_MAX=2
|
environment=HOME=/app/code,RAILS_ENV=production,MALLOC_ARENA_MAX=2
|
||||||
command=bundle exec sidekiq -c 2 -e production
|
command=bundle exec sidekiq -c %(ENV_SIDEKIQ_THREADS)s -e production
|
||||||
user=cloudron
|
user=cloudron
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[program:streaming]
|
[program:streaming]
|
||||||
priority=10
|
priority=10
|
||||||
directory=/app/code
|
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
|
command=node /app/code/streaming
|
||||||
user=cloudron
|
user=cloudron
|
||||||
autostart=true
|
autostart=true
|
||||||
|
|
Loading…
Reference in a new issue