Skip to content

Commit

Permalink
Make a docker image for testing sul-embed
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Nov 28, 2023
1 parent 215ef56 commit bf8804b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Dockerfile
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"]
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.6'

services:
web:
build: .
ports:
- 3001:3000
environment:
SECRET_KEY_BASE: '1'
RAILS_LOG_TO_STDOUT: 'true'
REMOTE_USER: [email protected]
tty: true

0 comments on commit bf8804b

Please sign in to comment.