Settings for running Rails on Docker are written.
- Click to
Use this template
and create your repository. - you need to rename
config/application.rb
module Myapp
↓ rename to
module YourRepositoryName
- install docker-compose
You need an environment that can run docker-compose. https://docs.docker.com/compose/install/
System | Version |
---|---|
Ruby | 2.7.0 |
bundler | 2.0.2 |
Rails | 6.0.2.1 |
MySQL | 5.7 |
docker-compose | 3 |
CircleCI | 2.1 |
- etc...
- nodejs, yarn
- webpacker
- rspec tools
- rubocop tools
docker-compose build
- build rails and mysql docker
docker-compose up
- up rails and mysql docker
Although react and vue are not included, webpacker is included, so you can install react and vue with the following command.
# install react
$ docker-compose run rails bundle exec rails webpacker:install:react
$ docker-compose run rails bundle exec rails generate react:install
# install vue
$ docker-compose run rails bundle exec rails webpacker:install:vue
$ docker-compose run rails bundle exec rails generate react:vue
docker-compose run rails bundle exec rails db:create
docker-compose run rails bundle exec rubocop
docker-compose run rails bundle exec rspec
- Nothing
- Nothing