-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1052 from sul-dlss/docker
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
ARG RUBY_VERSION=3.2.2-alpine | ||
FROM ruby:$RUBY_VERSION | ||
|
||
RUN apk add --update --no-cache \ | ||
build-base \ | ||
git \ | ||
tzdata | ||
|
||
WORKDIR /app | ||
|
||
ENV RAILS_ENV="production" \ | ||
BUNDLER_WITHOUT="development test" \ | ||
RAILS_SERVE_STATIC_FILES="true" | ||
|
||
COPY Gemfile Gemfile.lock ./ | ||
|
||
RUN bundle install | ||
|
||
COPY . . | ||
|
||
# Precompile bootsnap code for faster boot times | ||
RUN bundle exec bootsnap precompile --gemfile app/ lib/ | ||
|
||
# Precompiling assets for production without requiring secret RAILS_MASTER_KEY | ||
RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rails assets:precompile | ||
|
||
EXPOSE 3000 | ||
CMD ["./bin/rails", "server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '3.6' | ||
|
||
services: | ||
web: | ||
build: . | ||
ports: | ||
- 3001:3000 | ||
environment: | ||
SECRET_KEY_BASE: 'e55fb68eb0f1f4f82fbb56eafeebf1c134518fd466d1c3d01b2bfd3d6b5cd9347b4c15eecb3bdc0e4c5bc226dba626a23bb7b9ddb14f709638571f910002f639' | ||
RAILS_LOG_TO_STDOUT: 'true' | ||
REMOTE_USER: [email protected] | ||
SETTINGS__CORS__ALLOW_ORIGIN_URL: 'http://localhost:3000' | ||
tty: true |