Use supervisor and fixup env generation

This commit is contained in:
Girish Ramakrishnan
2019-07-17 14:14:32 -07:00
parent 60c393d04a
commit b2dfe539d0
12 changed files with 169 additions and 139 deletions

12
supervisor/nginx.conf Normal file
View File

@@ -0,0 +1,12 @@
[program:nginx]
priority=100
directory=/tmp
command=/usr/sbin/nginx -g "daemon off;"
user=root
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

13
supervisor/puma.conf Normal file
View File

@@ -0,0 +1,13 @@
[program:puma]
priority=10
directory=/app/code
environment=HOME=/app/code,RAILS_ENV=production,PORT=3000
command=bundle exec puma -C config/puma.rb
user=cloudron
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

12
supervisor/sidekiq.conf Normal file
View File

@@ -0,0 +1,12 @@
[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
user=cloudron
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0

13
supervisor/streaming.conf Normal file
View File

@@ -0,0 +1,13 @@
[program:streaming]
priority=10
directory=/app/code
environment=HOME=/app/code,NODE_ENV=production,PORT=4000,STREAMING_CLUSTER_NUM=1
command=node /app/code/streaming
user=cloudron
autostart=true
autorestart=true
stopsignal=QUIT
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0