Skip to content
Permalink
Browse files

Fix supervisord for docker builds

Bundler 2 requires HOME to be set, but supervisord dropping to the user
does not set the correct home env.
  • Loading branch information...
oliverguenther committed Mar 7, 2019
1 parent 89a2231 commit 071e6bf7b75aecde833ebfff1cdeacc3484e4e51
Showing with 4 additions and 3 deletions.
  1. +0 −3 Dockerfile
  2. +4 −0 docker/supervisord.conf
@@ -53,9 +53,6 @@ RUN cp docker/Procfile .
RUN cp packaging/conf/database.yml config/
RUN sed -i "s|Rails.groups(:opf_plugins)|Rails.groups(:opf_plugins, :docker)|" config/application.rb

# Ensure $APP_HOME is owned by app
RUN chown -R $APP_USER:$APP_USER $APP_PATH

# Ensure we can write in /tmp/op_uploaded_files (cf. #29112)
RUN mkdir -p /tmp/op_uploaded_files/
RUN chown -R $APP_USER:$APP_USER /tmp/op_uploaded_files/
@@ -5,6 +5,7 @@ nodaemon=true
priority=4
user=app
directory=/usr/src/app
environment=HOME="/home/app",USER="app"
command=./docker/web
autorestart=true
stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
@@ -14,6 +15,7 @@ stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
priority=5
user=app
directory=/usr/src/app
environment=HOME="/home/app",USER="app"
command=./docker/worker
autorestart=true
stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
@@ -23,6 +25,7 @@ stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
priority=100
user=app
command=/usr/bin/memcached
environment=HOME="/home/app",USER="app"
autorestart=true
stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log
stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
@@ -31,6 +34,7 @@ stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log
priority=100
user=app
directory=/usr/src/app
environment=HOME="/home/app",USER="app"
command=./docker/cron
autorestart=true
stderr_logfile = /var/log/supervisor/%(program_name)s-stderr.log

0 comments on commit 071e6bf

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.