Skip to content

Commit

Permalink
deploy: prod & dev가 같은 이미지를 사용하는 오류 수정 (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
mulmuri authored Feb 22, 2024
2 parents 08a48f8 + b9d4dcd commit 6405868
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/deploy.dev3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ permissions:
contents: read

env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
KEY: ${{ secrets.SSH_KEY }}
PORT: ${{ secrets.PORT }}
IMAGE_NAME: registry.uspray.kr/uspray-server-dev:latest
PROJECT_NAME: uspray-server-dev
DOMAIN_HOST: api.dev.uspray.kr


jobs:
deliver:
Expand Down Expand Up @@ -70,8 +68,9 @@ jobs:

- name: Deploy Docker image
env:
SERVICE_NAME: uspray-spring-dev
DOMAIN_HOST: api.dev.uspray.kr
SERVICE_NAME: ${{ env.PROJECT_NAME }}
DOMAIN_HOST: ${{ env.DOMAIN_HOST }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}
run: |
if [ ! -z "$(docker ps -q -f name=${{env.PROJECT_NAME}})" ]; then
docker compose -p ${{env.PROJECT_NAME}} down
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/deploy.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ permissions:
contents: read

env:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
KEY: ${{ secrets.SSH_KEY }}
PORT: ${{ secrets.PORT }}
IMAGE_NAME: registry.uspray.kr/uspray-server-prod:latest
PROJECT_NAME: uspray-server-prod
DOMAIN_HOST: api.uspray.kr

jobs:
test:
Expand Down Expand Up @@ -100,8 +97,9 @@ jobs:

- name: Deploy Docker image
env:
SERVICE_NAME: uspray-spring-prod
DOMAIN_HOST: api.uspray.kr
SERVICE_NAME: ${{ env.PROJECT_NAME }}
DOMAIN_HOST: ${{ env.DOMAIN_HOST }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}
run: |
if [ ! -z "$(docker ps -q -f name=${{env.PROJECT_NAME}})" ]; then
docker compose -p ${{env.PROJECT_NAME}} down
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
version: '3.8'

services:
uspray-spring:
image: registry.uspray.kr/uspray-server-dev:latest
api:
container_name: ${SERVICE_NAME}
image: ${IMAGE_NAME}
environment:
TZ: "Asia/Seoul"
ports:
Expand Down

0 comments on commit 6405868

Please sign in to comment.