Sign inSign up

fmer/docker-rails-example

By fmer

Updated about 9 years ago

Using docker for development and deployment of rails applications

Image
0

1.1K

fmer/docker-rails-example repository overview

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

Tag summary

Content type

Image

Digest

Size

184.9 MB

Last updated

about 9 years ago

docker pull fmer/docker-rails-example