Easy useable docker for rails. less configuration, affordable production.
- unicorn, nginx, foreman
- mysql, postgresql lib
- Create
Dockerfile
to your project and paste below code.
# Dockerfile
FROM seapy/rails-nginx-unicorn
MAINTAINER seapy(iamseapy@gmail.com)
EXPOSE 80
- Add
unicorn
gem(maybe uncommentgem 'unicorn'
inGemfile
)
# 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
if your rails app required pre-install lib like imagemagick(or others) use rails-nginx-unicorn-pro
# 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.2.0-nginx1.6.0
...
- github connection setting(like bitbucket)