This repository is a template for creating a rails 6 project.
It is based on docker quickstart: https://docs.docker.com/samples/rails/, but several improvement is introduced
- this repository is for rails 6, not 5.
- using this repository makes a project development-ready in linux.
- clone this repo, chane the directory name or copy the directory as your project name
- add your password for postgresql in
.env.db.dev
- run
docker-compose run --no-deps web bundle ex rails new . --force --database=postgresql
- modify
src/config/database.yaml
for db connection. an example is...
default: &default
adapter: postgresql
encoding: unicode
host: db
username: postgres
password: your_password
- run
docker-compose up -d
anddocker-compose exec web bundle ex rails db:create
- now access to
localhost:4000
. you should see "Yay! Ruby on Rails!"