To do:
docker-compose build
- creating images
docker-compose up --no-start
- creating containers
More about rails new command here: https://guides.rubyonrails.org/command_line.html#rails-new
docker-compose run --rm web bash -c 'bundle && bundle exec rails new . -T -f --skip-turbolinks --skip-action-cable --skip-coffee --skip-git -d postgresql && bundle --jobs=4 && bundle exec rails g rspec:install'
- run bin/rails new
Following lines have to exist in database.yml file:
host: db
username: postgres
Then run:
docker-compose run --rm web bin/rails db:create db:migrate db:seed
That's all!