Skip to content
Permalink
Browse files

Fix dockerfile on 8.3.0

  • Loading branch information...
oliverguenther committed Mar 7, 2019
1 parent e40a20e commit 5d3188afe38e6f1ca257a75a0908e2fcdb8d757e
Showing with 18 additions and 3 deletions.
  1. +3 −0 Dockerfile
  2. +1 −1 Gemfile
  3. +5 −1 config/boot.rb
  4. +9 −1 docker/entrypoint-all-in-one.sh
@@ -53,6 +53,9 @@ 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_HOME

# 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/
@@ -270,7 +270,7 @@ group :development, :test do
gem 'pry-stack_explorer', '~> 0.4.9.2'
end

gem 'bootsnap', '~> 1.3.2', require: true
gem 'bootsnap', '~> 1.3.2', require: false

# API gems
gem 'grape', '~> 1.2.3'
@@ -38,4 +38,8 @@

require 'bundler/setup' # Set up gems listed in the Gemfile.

require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
if ENV['RAILS_ENV'] == 'development'
$stderr.puts "Starting with bootsnap."

require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
end
@@ -7,13 +7,21 @@ PGDATA=${PGDATA:=/var/lib/postgresql/9.6/main}
PGUSER=${PGUSER:=postgres}
PGPASSWORD=${PGPASSWORD:=postgres}
PG_STARTUP_WAIT_TIME=${PG_STARTUP_WAIT_TIME:=10}
SUPERVISORD_LOG_LEVEL=${SUPERVISORD_LOG_LEVEL:=info}
PGBIN="/usr/lib/postgresql/9.6/bin"

if [ ! -z "$ATTACHMENTS_STORAGE_PATH" ]; then
mkdir -p "$ATTACHMENTS_STORAGE_PATH"
chown -R app:app "$ATTACHMENTS_STORAGE_PATH"
fi

if [ "$(id -u)" = '0' ]; then
echo "-----> Ensure $APP_PATH is owned by $APP_USER"
mkdir -p "$APP_PATH/log" "$APP_PATH/tmp" "$APP_PATH/files"
chown $APP_USER:$APP_USER "$APP_PATH"
chown -R $APP_USER:$APP_USER "$APP_PATH/log" "$APP_PATH/tmp" "$APP_PATH/files"
fi

dbhost=$(ruby -ruri -e 'puts URI(ENV.fetch("DATABASE_URL")).host')
pwfile=$(mktemp)
echo "$PGPASSWORD" > $pwfile
@@ -100,5 +108,5 @@ echo "-----> Database setup finished."
echo " On first installation, the default admin credentials are login: admin, password: admin"

echo "-----> Launching supervisord..."
exec /usr/bin/supervisord
exec /usr/bin/supervisord -e ${SUPERVISORD_LOG_LEVEL}

0 comments on commit 5d3188a

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.