Research Project for ActiveResource::eyes:
- Docker Compose 3.9
- ruby 2.2
- Ruby on Rails 4.3
- ruby 3.2
- Ruby on Rails 7.0
- MySQL 8.0
- edit versions
.env
COMPOSE_RUBY_VERSION=3.2.0
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 api bundle exec rails new . --api -d mysql
docker-compose run --rm app bundle exec rails new . --skip-activerecord
if you clone existing rails project by cloning repository
# create credentials
docker-compose run --rm --no-deps -e EDITOR="vi" app bundle exec rails credentials:edit
docker-compose up -d