Fix production assets compiling in Dockerfile (#215)

This commit is contained in:
Riccardo Graziosi
2023-05-06 14:34:31 +02:00
committed by GitHub
parent cfa8caa0cc
commit 84c6bd06bd
3 changed files with 61 additions and 65 deletions

View File

@@ -35,7 +35,7 @@ COPY . ${APP_ROOT}/
# Compile assets if production
# SECRET_KEY_BASE=1 is a workaround (see https://github.com/rails/rails/issues/32947)
RUN if [ "$ENVIRONMENT" = "production" ]; then SECRET_KEY_BASE=1 RAILS_ENV=production bundle exec rake assets:precompile; fi
RUN if [ "$ENVIRONMENT" = "production" ]; then RAILS_ENV=development bundle exec rake webpacker:compile; fi
###
### Dev stage ###