Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
Fixed env variable handling in Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dokurnon committed Jul 17, 2020
1 parent a6c39f2 commit 9a1892e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Fixed deprecation warnings ([#1787](https://gitlab.com/yale-sdmp/reservations/issues/1787)).
* Fixed CI build for cron ([#1816](https://gitlab.com/yale-sdmp/reservations/issues/1816)).
* Fixed Docker logging to STDOUT ([#1819](https://gitlab.com/yale-sdmp/reservations/issues/1819)).
* Fixed environment variable handling in Dockerfile.prod ([#1821](https://gitlab.com/yale-sdmp/reservations/issues/1821)).

### Security
* Updated Nokogiri from 10.10.4 to 10.10.5 for CVE-2019-13117 ([#1792](https://gitlab.com/yale-sdmp/reservations/issues/1792)).
Expand Down
1 change: 0 additions & 1 deletion Dockerfile.cron
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM ruby:2.6.5
ARG MASTER_KEY=$MASTER_KEY

# Add NodeJS repo
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM ruby:2.6.5
ARG MASTER_KEY=$MASTER_KEY

# Add NodeJS repo
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
Expand Down Expand Up @@ -29,6 +28,7 @@ RUN yarn install
COPY . /usr/src/app/
WORKDIR /usr/src/app
COPY config/database.yml.example.production config/database.yml
COPY config/secrets.yml.example config/secrets.yml

# Add entrypoint
COPY entrypoint-prod.sh /usr/bin/
Expand Down
2 changes: 1 addition & 1 deletion entrypoint-prod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
rm -f /app/tmp/pids/server.pid

# Precompile assets
SECRET_KEY_BASE=$MASTER_KEY RAILS_ENV=production rails assets:precompile
SECRET_KEY_BASE=$SECRET_KEY_BASE RAILS_ENV=production rails assets:precompile

# Then exec the container's main process (what's set as CMD in the Dockerfile).
exec "$@"

0 comments on commit 9a1892e

Please sign in to comment.