2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

docker-compose コマンド一覧(Rails用)

Last updated at Posted at 2020-10-20

忘れないために書きます

###docker起動

 #foregroundで起動 
 docker-compose up #

 #backgroundで起動
 docker-compose up -d

###docker停止

 #foregroundで起動時
 Ctr + C

 #backgroundで起動時
 docker-compose stop 

###Gemfile変更時

 docker-compose build

###コントローラーを作成

docker-compose run web bundle exec rails g controller <コントローラー名> <アクション名>

###モデルの作成

docker-compose run web bundle exec rails g model <モデル名> <カラム名:型>

###テーブルの作成

docker-compose run web bundle exec rake db:migrate

###全部消すとき

docker-compose down --rmi all --volumes

また新しいこと覚えたときに追加します。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?