Skip to content

Commit

Permalink
Update detail
Browse files Browse the repository at this point in the history
  • Loading branch information
beming-dev committed Jan 11, 2025
1 parent 252e78c commit a4232d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ phases:
build:
commands:
- echo Building the Docker image...
- docker build -t 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend/frontend:latest .
- docker build -t next-app .
- docker tag next-app 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend/frontend:latest
post_build:
commands:
- echo Pushing the Docker image to ECR...
Expand Down
6 changes: 3 additions & 3 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
cd /home/ubuntu/app
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
EDGE_AWS_ACCESS_KEY_ID=$(aws secretsmanager get-secret-value --secret-id about/frontend --query SecretString --output text | jq -r '.EDGE_AWS_ACCESS_KEY_ID')
EDGE_AWS_SECRET_ACCESS_KEY=$(aws secretsmanager get-secret-value --secret-id about/frontend --query SecretString --output text | jq -r '.EDGE_AWS_SECRET_ACCESS_KEY')
EDGE_DISTRIBUTION_ID=$(aws secretsmanager get-secret-value --secret-id about/frontend --query SecretString --output text | jq -r '.EDGE_DISTRIBUTION_ID')
Expand Down Expand Up @@ -30,7 +30,7 @@ APPLE_TEAM_ID=$(aws secretsmanager get-secret-value --secret-id about/frontend -
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 \
docker run -d --name next-app \
-e EDGE_AWS_ACCESS_KEY_ID=$EDGE_AWS_ACCESS_KEY_ID \
-e EDGE_AWS_SECRET_ACCESS_KEY=$EDGE_AWS_SECRET_ACCESS_KEY \
-e EDGE_DISTRIBUTION_ID=$EDGE_DISTRIBUTION_ID \
Expand All @@ -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/frontend:latest
-p 3000:3000 294951093594.dkr.ecr.ap-northeast-2.amazonaws.com/frontend:latest

0 comments on commit a4232d6

Please sign in to comment.