/docker-compose-rails-dev-example

A Docker compose project example I use to develop rails apps with Docker

Primary LanguageRubyMIT LicenseMIT

Example of a Rails App with BuildPack

Install docker and pack cli from https://buildpacks.io/docs/tools/pack/

Build the image

pack build rails_example

Setup the database

docker run -e DATABASE_URL=postgres://admin:admin@127.0.0.1/rails_example?pool=5 -e SECRET_KEY_BASE=example --net=host rails-example rake db:setup

Run it (we suppose you already installed postgres)

docker run -e DATABASE_URL=postgres://admin:admin@127.0.0.1/rails_example?pool=5 -e SECRET_KEY_BASE=example --net=host rails-example

You should be able to access to http://127.0.0.1:5000/posts

License

This is free software, and may be redistributed under the terms specified in the LICENSE file.