for create new repository from this template.
- Docker Compose 3.9
- ruby 3.2
- Ruby on Rails 7.0
- Node 14.15.3
- MySQL 8.0
- edit versions
.env
COMPOSE_RUBY_VERSION=3.2.0
COMPOSE_NODE_VERSION=19.4
COMPOSE_ALPINE_VERSION=3.17 # 余計なイメージのダウンロードを避けるため、ALPINEのバージョンをそろえて高速化する
COMPOSE_MYSQL_VERSION=8.0.31
Gemfile
ruby '3.2.0'
gem 'rails', '~> 7.0.4'
- execute command below and create rails project
# create rails project
docker-compose run --rm --no-deps app bundle exec rails new . -d mysql
if you clone existing rails project by cloning repository
# create credentials
docker-compose run --rm --no-deps -e EDITOR="vi" app bundle exec rails bin/rails credentials:edit
docker-compose up -d
- frontend コンテナ作成
- package.json 作成
- インストールコマンド修正(Rails as API、frontend framework)