- Rails 5.2.0
- Postgres
To get started:
- Clone this repo into a new named folder
- Open the folder and run
docker-compose run web rails new . --force --database=postgresql
- On linux run
sudo chown -R $USER:$USER .
- Change
database.yml
localhost to:
default: &default
adapter: postgresql
encoding: unicode
host: db
username: postgres
pool: 5
development:
<<: *default
database: myapp_development
test:
<<: *default
database: myapp_test
- Build the containers
docker-compose build
- Finally you need to create the database
docker-compose run web rake db:create