Skip to content

Commit

Permalink
Update aws
Browse files Browse the repository at this point in the history
  • Loading branch information
beming-dev committed Jan 11, 2025
1 parent 11d9e54 commit 252e78c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/about
- aws ecr get-login-password --region ap-northeast-2 | docker login --username AWS --password-stdin 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend
build:
commands:
- echo Building the Docker image...
- docker build -t 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/about/front:latest .
- docker build -t 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend/frontend:latest .
post_build:
commands:
- echo Pushing the Docker image to ECR...
- docker push 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/about/front:latest
- docker push 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend:latest
artifacts:
files:
- appspec.yml
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ APPLE_KEY_ID=$(aws secretsmanager get-secret-value --secret-id about/frontend --
APPLE_PRIVATE_KEY=$(aws secretsmanager get-secret-value --secret-id about/frontend --query SecretString --output text | jq -r '.APPLE_PRIVATE_KEY')
APPLE_TEAM_ID=$(aws secretsmanager get-secret-value --secret-id about/frontend --query SecretString --output text | jq -r '.APPLE_TEAM_ID')

docker pull 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/about/front:latest
docker pull 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend:latest
docker stop next-app || true
docker rm next-app || true
docker run -d \
Expand Down Expand Up @@ -56,4 +56,4 @@ docker run -d \
-e APPLE_KEY_ID=$APPLE_KEY_ID \
-e APPLE_PRIVATE_KEY=$APPLE_PRIVATE_KEY \
-e APPLE_TEAM_ID=$APPLE_TEAM_ID \
--name next-app -p 3000:3000 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/about/front:latest
--name next-app -p 3000:3000 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend:latest

0 comments on commit 252e78c

Please sign in to comment.