Skip to content

YutaOkoshi/next-prisma-sample-on-ecs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

next-prisma-sample-on-ecs

about

  • deploy flow

  • n-ecs-ページ1 drawio

  • Cloudformation Stack

  • cs-ページ2 drawio

deploy to aws

  1. cdk deploy
$ cd cdk

$ yarn
$ yarn cdk bootstrap
$ yarn cdk deploy EcrStack
  1. Docker push to ECR
$ cd ./app
$ aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 123412341234.dkr.ecr.ap-northeast-1.amazonaws.com
$ docker build --platform linux/amd64 -t next-prisma-sample .
$ docker tag next-prisma-sample:latest 123412341234.dkr.ecr.ap-northeast-1.amazonaws.com/next-prisma-sample:latest
$ docker push 123412341234.dkr.ecr.ap-northeast-1.amazonaws.com/next-prisma-sample:latest
  1. cdk deploy main stack
$ cd ../cdk
$ yarn cdk deploy MainStack
  1. Check to Top page

スクリーンショット 2023-11-27 20 54 45

  1. Setting GitHub Actions Variables
  • Variables
    • AWS_IAM_ROLE_ARN
    • AWS_REGION
    • ECS_CLUSTER_NAME
    • ECS_SERVICE_NAME
    • ECS_TASK_DEFINITION_ARN

スクリーンショット 2023-11-27 20 54 16

  1. Git Push for Deploy to ECS
$ git push
  1. DB Migration
# On host os

$ bash ./script/run-migrate-task.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published