Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.06 KB

README.md

File metadata and controls

36 lines (27 loc) · 1.06 KB

docker-rails-example

Rails application development and deployment with docker.

Development

Start the services:

$ docker-compose up -d

Create the database:

$ docker-compose run --rm web bin/rails db:create

Production

Deploy the application via stack.yml into a swarm cluster.

Try in PWD

or

deploy the services via the CLI

$ docker stack deploy -c stack.yml rails

After deploying the application with PWD or manually the database has to be created.

$ cname=$(docker ps --format '{{.Names}}' | grep 'web' | head -1)
$ docker exec $cname bin/rails db:create

Make sure everything works as expected by visiting the /heatlh endpoint and checking the container health via docker ps.

See also