Created
March 31, 2020 21:01
-
-
Save abimaelmartell/af2f87ce25d3601abeb232695a22e7fd to your computer and use it in GitHub Desktop.
Docker for Rails
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
FROM ruby:2.7.0-alpine | |
ENV PORT=80 | |
RUN apk add --no-cache \ | |
build-base \ | |
libxml2-dev \ | |
libxslt-dev \ | |
postgresql-dev \ | |
tzdata | |
WORKDIR /app | |
ADD Gemfile* /app/ | |
ENV RAILS_ENV production | |
RUN bundle install --deployment --without development test --jobs 20 --retry 5 | |
COPY . /app | |
EXPOSE $PORT | |
CMD bin/entry.sh |
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
#!/bin/sh | |
set -e | |
bundle exec rake tmp:create | |
bundle exec rake db:migrate | |
bundle exec puma -C config/puma.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment