Skip to content

Commit

Permalink
fix(ci): docker 명령어 순서 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
seungholee-dev committed Apr 14, 2024
1 parent 422d3cb commit 22c8524
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/deploys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,11 @@ jobs:
aws configure set default.region $AWS_REGION_CODE
aws configure set default.ouput json
echo "$ECR_REGISTRY" >> test.txt
echo "$ECR_REPOSITORY" >> test.txt
echo "$AWS_ACCESS_KEY_ID" >> test.txt
echo "$DB_HOST" >> test.txt
echo "$DB_PORT" >> test.txt
echo "$DB_NAME" >> test.txt
echo "$DB_PASSWORD" >> test.txt
docker stop myapp || true
docker rm myapp || true
aws ecr get-login-password --region $AWS_REGION_CODE | docker login --username AWS --password-stdin $ECR_REGISTRY
docker pull $ECR_REGISTRY/$ECR_REPOSITORY:latest
docker run -d \
--name myapp \
-p 8080:8080 \
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
-e AWS_REGION_CODE=$AWS_REGION_CODE \
Expand All @@ -93,4 +83,5 @@ jobs:
-e JWT_SECRET=$JWT_SECRET \
-e GOOGLE_EMAIL=$GOOGLE_EMAIL \
-e GOOGLE_APP_PASSWORD=$GOOGLE_APP_PASSWORD \
$ECR_REGISTRY/$ECR_REPOSITORY:latest \
-p 8080:8080 \
--name myapp $ECR_REGISTRY/$ECR_REPOSITORY:latest

0 comments on commit 22c8524

Please sign in to comment.