From 8f3973bbffbbb7223f832e86e96e2d84a3f33656 Mon Sep 17 00:00:00 2001 From: Georg Gadinger Date: Sat, 4 Feb 2023 07:13:26 +0100 Subject: [PATCH] Containerfile: turn `SECRET_KEY_BASE` at build-time into a buildarg this is to not have `SECRET_KEY_BASE` present in the resulting container as it's only required to run some rake tasks --- Containerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Containerfile b/Containerfile index 4d3a6049..637aebee 100644 --- a/Containerfile +++ b/Containerfile @@ -65,14 +65,13 @@ RUN bundle config set without 'development test' \ && yarn install --frozen-lockfile # temporarily set a SECRET_KEY_BASE and copy config files so rake tasks can run -ENV SECRET_KEY_BASE=secret_for_build +ARG SECRET_KEY_BASE=secret_for_build RUN cp config/justask.yml.example config/justask.yml \ && cp config/database.yml.postgres config/database.yml \ && bundle exec rails locale:generate \ && bundle exec i18n export \ && bundle exec rails assets:precompile \ && rm config/justask.yml config/database.yml -ENV SECRET_KEY_BASE= # set some defaults ENV RAILS_LOG_TO_STDOUT=true