https://github.com/zeroc0d3/docker-rails-nginx-unicorn
Docker Rails + Nginx + Unicorn (from Ubuntu 16.04 & Ruby 2.4.0)
https://github.com/zeroc0d3/docker-rails-nginx-unicorn
docker foreman nginx rails ruby ubuntu unicorn
Last synced: 5 months ago
JSON representation
Docker Rails + Nginx + Unicorn (from Ubuntu 16.04 & Ruby 2.4.0)
- Host: GitHub
- URL: https://github.com/zeroc0d3/docker-rails-nginx-unicorn
- Owner: zeroc0d3
- Created: 2017-04-26T03:50:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-26T08:58:46.000Z (over 8 years ago)
- Last Synced: 2025-03-31T00:24:46.055Z (6 months ago)
- Topics: docker, foreman, nginx, rails, ruby, ubuntu, unicorn
- Language: Ruby
- Size: 4.88 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-rails-nginx-unicorn
[](https://microbadger.com/images/zeroc0d3/docker-rails-nginx-unicorn "Layers") [](https://microbadger.com/images/zeroc0d3/docker-rails-nginx-unicorn "Latest")Docker Rails + Nginx + Unicorn (from Ubuntu 16.04 & Ruby 2.4.0). Easy useable docker for rails. less configuration, affordable production.
## What's include
* unicorn, nginx, foreman
* mysql, postgresql lib# Usage
* Create `Dockerfile` to your project and paste below code.
```
# Dockerfile
FROM zeroc0d3/docker-rails-nginx-unicornMAINTAINER ZeroC0D3 Team (zeroc0d3.0912@gmail.com)
EXPOSE 80
```* Add `unicorn` gem (add/uncomment `gem 'unicorn'` in `Gemfile`)
## Build and run docker
```
# build your dockerfile
$ docker build -t your/project .# run container
$ docker run -d -p 80:80 -e SECRET_KEY_BASE=secretkey your/project
```# Custom pre-install lib
if your rails app required pre-install lib like imagemagick (or others) use [`rails-nginx-unicorn-pro`](https://github.com/zeroc0d3/docker-rails-nginx-unicorn-pro)
# Customize Nginx, Unicorn, Foreman config
## Nginx
```
# your Dockerfile
...
ADD config/your-custom-nginx.conf /etc/nginx/sites-enabled/default
...
```## Unicorn
place your unicorn config to `config/unicorn.rb`
## foreman
place your Procfile to app root
# Use a specific version of Ruby, Nginx
Change `FROM` instruction your Dockerfile
```
# Dockerfile
FROM zeroc0d3/docker-rails-nginx-unicorn:ruby2.4.0-nginx1.10.3
...
```