3
1

More than 3 years have passed since last update.

Rails APIモード Docker-Compose

Posted at
$ cd

$ mkdir sample_app

$ cd sample_app

以下ファイルを用意
Dockerfile
docker-compose.yml
Gemfile
Gemfile.lock
environment.rb

以下コマンドを実行

$ docker-compose run web rails new . --force --database=mysql --skip-bundle --api --webpacker

以下のコマンドを順に打ちます。

$ docker-compose build

$ docker-compose run web yarn install --check-files

$ docker-compose run web rake db:create

$ docker-compose up

以下の

http://localhost:3000/ 

にアクセスします。

3
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
3
1