Skip to content

ty-2000/mituke-ru

Repository files navigation

Sample App

メインの Rails アプリケーション

環境構築

docker-compose build
docker-compose run --rm app yarn install --check-files
docker-compose run --rm app bin/setup

サーバー起動

docker-compose up
open http://localhost:13000

テストの実行

docker-compose run --rm app bin/rails test

rspecの実行

 docker-compose run --rm app bundle exec rspec

Rubocop の実行

docker-compose run --rm app bundle exec rubocop

Autocorrectableミスがある場合、下記のコマンドを実行すべき! docker-compose run --rm app bundle exec rubocop -A

erb-lint の実行

docker-compose run --rm app bundle exec erblint --lint-all -a

サーバへのデプロイ

  1. (初回のみ) aws ecs run-task --cluster internship-sep2022-2 --task-definition internship-sep2022-2-db-create --launch-type FARGATE --network-configuration '{"awsvpcConfiguration":{"subnets":["subnet-0334f01a7f2e84910","subnet-06e60f8f517606654","subnet-0df45f1bdece2446d"],"securityGroups": ["sg-0d5c892c6adf48f05"],"assignPublicIp":"ENABLED"}}' --count 1rails db:create を本番環境のDBに適用し、この Rails アプリが使用する MySQL のデータベースを作成する。
  2. GitHub Actions タブの deploy ワークフロー に移動
  3. This workflow has a workflow_dispatch event trigger. の右側にある Run Workflow ボタンをクリック
  4. Use workflow from のセレクトボックスからデプロイ対象のブランチを選択
  5. Run Workflow ボタンをクリック

ステージング

https://sep2022-2.intern.speee.in

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published