Rails(+ Nginx, Unicorn) Dockerfile. Easy useable docker for rails. less configuration, affordable
2.8K
https://github.com/seapy/dockerfiles/tree/master/rails-nginx-unicorn
Easy useable docker for rails. less configuration, affordable production.
Dockerfile to your project and paste below code.# Dockerfile
FROM seapy/rails-nginx-unicorn
MAINTAINER seapy([email protected])
EXPOSE 80
unicorn gem(maybe uncomment gem 'unicorn' in Gemfile)~/.ssh/id_rsa to id_rsa for bitbucket connection. if you don't need to bitbucket connection, create blank id_rsa. don't forget add id_rsa to .gitignore# build your dockerfile
$ docker build -t your/project .
# run container
$ docker run -d -p 80:80 -e SECRET_KEY_BASE=secretkey your/project
Easy Ruby On Rails deploy on Docker
# your Dockerfile
...
ADD config/your-custom-nginx.conf /etc/nginx/sites-enabled/default
...
place your unicorn config to config/unicorn.rb
place your Procfile to app root
Change FROM instruction your Dockerfile
# Dockerfile
FROM seapy/rails-nginx-unicorn:ruby2.1.2-nginx1.6.0
...
Content type
Image
Digest
sha256:df54b6e8c…
Size
396.2 MB
Last updated
almost 11 years ago
docker pull seapy/rails-nginx-unicorn