Skip to content

Commit

Permalink
Don't force_ssl and enable mulit-arch builds
Browse files Browse the repository at this point in the history
We don't need to force_ssl on the rails application and ingress controller can handle that.

Also adds a fix for the missing `log` dir and enables multi-arch builds
  • Loading branch information
abtreece committed May 9, 2024
1 parent a350f1a commit 4b48e2a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: latest
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ COPY --from=build /usr/include/node /usr/include/node

# Run and own only the runtime files as a non-root user for security
RUN useradd rails --create-home --shell /bin/bash && \
mkdir -p db log tmp && \
chown -R rails:rails db log tmp
USER rails:rails

Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# config.assume_ssl = true

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true
config.force_ssl = false

# Log to STDOUT by default
config.logger = ActiveSupport::Logger.new(STDOUT)
Expand Down

0 comments on commit 4b48e2a

Please sign in to comment.