Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename environment variable to rails convention #72

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ RUN bundle install
# Params
ARG RAILS_ENV="production"
ARG RAILS_SERVE_STATIC_FILES="true"
ARG RELATIVE_URL_ROOT="/app/root"
ARG RAILS_RELATIVE_URL_ROOT="/app/root"

# Set environment variables and expose the running port
ENV RAILS_ENV=$RAILS_ENV
ENV RAILS_SERVE_STATIC_FILES=$RAILS_SERVE_STATIC_FILES
ENV RELATIVE_URL_ROOT=$RELATIVE_URL_ROOT
ENV SCRIPT_NAME=$RELATIVE_URL_ROOT
ENV RAILS_RELATIVE_URL_ROOT=$RAILS_RELATIVE_URL_ROOT
ENV SCRIPT_NAME=$RAILS_RELATIVE_URL_ROOT
EXPOSE 3000

# Precompile assets and add entrypoint script
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

config.logger = JsonRailsLogger::Logger.new($stdout)

config.relative_url_root = ENV['RELATIVE_URL_ROOT'] || '/'
config.relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT'] || '/'

config.accessibility_document_path = '/accessibility'
config.privacy_document_path = '/privacy'
Expand Down