Skip to content

Commit

Permalink
db 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
KimMinWoooo committed Aug 28, 2024
1 parent 4794898 commit d9ebde3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ jobs:
--document-name "AWS-RunShellScript" \
--parameters '{
"commands": [
"sudo docker pull prunsoli/ktb-19-db:1.0",
"sudo docker pull ${{ env.DOCKER_HUB_USERNAME }}/backend:latest",
"sudo docker pull ${{ env.DOCKER_HUB_USERNAME }}/ai:latest",
"sudo docker stop backend ai || true",
"sudo docker rm backend ai || true",
"sudo docker network create backend-network || true",
"sudo docker run -d --name ai --network backend-network -p 5000:5000 ${{ env.DOCKER_HUB_USERNAME }}/ai:latest",
"sudo docker run -d --name backend --network backend-network -p 8080:8080 ${{ env.DOCKER_HUB_USERNAME }}/backend:latest"
"sudo docker stop backend ai db || true",
"sudo docker rm backend ai db || true",
"sudo docker network create app-network || true",
"sudo docker run -d --name db --network app-network -p 3306:3306 prunsoli/ktb-19-db:1.0",
"sudo docker run -d --name ai --network app-network -p 8000:8000 -e PROJECT_NAME=ParseAI -e DATABASE_URL=mysql+aiomysql://root:qlalfqjsgh486@db:3306/moviedatabase ${{ env.DOCKER_HUB_USERNAME }}/ai:latest",
"sudo docker run -d --name backend --network app-network -p 8080:8080 -e SPRING_DATASOURCE_URL=jdbc:mysql://db:3306/moviedatabase?serverTimezone=Asia/Seoul -e SPRING_DATASOURCE_USERNAME=root -e SPRING_DATASOURCE_PASSWORD=qlalfqjsgh486 -e AI_SERVICE_URL=http://ai:8000/api/v1 ${{ env.DOCKER_HUB_USERNAME }}/backend:latest"
]
}'
Expand Down

0 comments on commit d9ebde3

Please sign in to comment.