docker-compose command list (for Rails)

I will write it so that I will not forget it

start docker

 #Launch with foreground
 docker-compose up #

 #Start with background
 docker-compose up -d

docker stop

 #At startup with foreground
 Ctr + C

 #At startup with background
 docker-compose stop 

When changing Gemfile

 docker-compose build

Create a controller

docker-compose run web bundle exec rails g controller <Controller name> <Action name>

Creating a model

docker-compose run web bundle exec rails g model <Model name> <Column name:Type>

Creating a table

docker-compose run web bundle exec rake db:migrate

When erasing everything

docker-compose down --rmi all --volumes

I will add it when I learn something new.

Recommended Posts

docker-compose command list (for Rails)
Command docker-compose
Docker command list
Docker-compose command memo
[Docker] Command list
Remedy for command not found in rails s
[Note] Rails error list
[Rails] Migration command summary
Frequently used docker-compose command
[Rails] rails db command summary
[Rails 6] Rubocop warning list
Stable development environment construction manual for "Rails6" with "Docker-compose"
rails new application launch command
Docker, docker-compose for server-side Kotlin
Preparation for developing with Rails
(For beginners) [Rails] Install Devise
Install docker, docker-compose for debin10
Rails 6 (API mode) + MySQL Docker environment creation by docker-compose (for Mac)
Ruby on Rails for beginners! !! Post list / detailed display function summary
Database command for migration file environment
Summary of rails validation (for myself)
[Rails] List instances of multiple models
[Rails] DB design for EC site
rails tutorial chapter 10 summary (for self-learning)
A list of rawValues for UITextContentType.
[Rails] How to speed up docker-compose
Sort in List, for personal notes
List of alternative distributions for CentOS
[EC2 / Vue / Rails] EC2 deployment procedure for Vue + Rails