This image uses nginx and foreman to deploy a rails app
bundle exec foreman start as the default run commandDockerfile:
FROM naps62/rails:latest
# rbenv is installed without any rubies
# install one and set it as default
RUN rbenv install 2.1.3
RUN rbenv global 2.1.3
RUN gem install bundler
# pre bundle
# this is optional, but will speed up builds, so that bundle install will be
# skipped when the Gemfile is unchaged
WORKDIR /tmp
ADD Gemfile /tmp/
ADD Gemfile.lock /tmp/
RUN bundle install
# clean up
RUN rm -rf /tmp/*
# install your app
ADD . /var/www/my-app
ADD config/nginx.conf /etc/nginx/sites-enabled/my-app
ENV RAILS_ENV productionn
WORKDIR /var/www/my-app
Procfile
web: bundle exec puma -C config/puma.rb
config/nginx.conf:
server {
listen 80;
root /var/www/my-app;
location / {
}
}
Content type
Image
Digest
sha256:384bcdc1f…
Size
214.8 MB
Last updated
almost 11 years ago
docker pull naps62/rails