Rails6.0の環境を簡単に作りたかっただけ
- Clone
git clone
- Project Initialization
docker-compose run web rails new . --force --no-deps --database=mysql
- Edit database.yml
default: &default
adapter: mysql2
encoding: utf8mb4
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
username: root
password: root
host: db
-
Create src/config/webpacker.yml https://raw.githubusercontent.com/rails/webpacker/master/lib/install/config/webpacker.yml
-
Run
docker-compose up