diff --git a/.github/workflows/aws-cicd-prod.yml b/.github/workflows/aws-cicd-prod.yml index 120105e4..0fe3a56a 100644 --- a/.github/workflows/aws-cicd-prod.yml +++ b/.github/workflows/aws-cicd-prod.yml @@ -4,7 +4,7 @@ on: push: branches: - main - - chore/migration + - chore/LA-28 env: REGISTRY: "docker.io" diff --git a/layer-admin/src/main/java/org/layer/member/controller/AdminMemberController.java b/layer-admin/src/main/java/org/layer/member/controller/AdminMemberController.java index 1d85167b..795efed0 100644 --- a/layer-admin/src/main/java/org/layer/member/controller/AdminMemberController.java +++ b/layer-admin/src/main/java/org/layer/member/controller/AdminMemberController.java @@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor; -@RequestMapping("/admin/members") +@RequestMapping("/members") @RequiredArgsConstructor @RestController public class AdminMemberController implements AdminMemberApi { diff --git a/layer-api/infra/production/docker-compose-blue.yaml b/layer-api/infra/production/docker-compose-blue.yaml index 82d57859..07496c7d 100644 --- a/layer-api/infra/production/docker-compose-blue.yaml +++ b/layer-api/infra/production/docker-compose-blue.yaml @@ -13,6 +13,21 @@ services: - ./tokens:/config/tokens networks: - app-network + - + layer-admin-blue: + image: docker.io/clean01/layer-server_layer-admin:latest + container_name: layer-admin-blue + ports: + - "8082:8080" + environment: + - TZ=Asia/Seoul + - SPRING_PROFILES_ACTIVE=prod + volumes: + - ./application-secret.properties:/config/application-secret.properties + - ./log:/log + - ./tokens:/config/tokens + networks: + - app-network batch-job-blue: image: docker.io/clean01/layer-server_layer-batch:latest diff --git a/layer-api/infra/production/docker-compose-green.yaml b/layer-api/infra/production/docker-compose-green.yaml index bf36a0b6..90a2766a 100644 --- a/layer-api/infra/production/docker-compose-green.yaml +++ b/layer-api/infra/production/docker-compose-green.yaml @@ -14,6 +14,21 @@ services: networks: - app-network + layer-admin-green: + image: docker.io/clean01/layer-server_layer-admin:latest + container_name: layer-admin-green + ports: + - "8082:8080" + environment: + - TZ=Asia/Seoul + - SPRING_PROFILES_ACTIVE=prod + volumes: + - ./application-secret.properties:/config/application-secret.properties + - ./log:/log + - ./tokens:/config/tokens + networks: + - app-network + batch-job-green: image: docker.io/clean01/layer-server_layer-batch:latest container_name: layer-batch-green diff --git a/layer-api/infra/production/nginx.blue.conf b/layer-api/infra/production/nginx.blue.conf index 326ea474..eeb60d50 100644 --- a/layer-api/infra/production/nginx.blue.conf +++ b/layer-api/infra/production/nginx.blue.conf @@ -8,6 +8,7 @@ http { server { listen 80; + # 기존 라우팅 (서비스 api) location / { proxy_pass http://layer-api; proxy_set_header Host $host; @@ -15,5 +16,14 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } + + # /admin 요청 라우팅 + location /layer-admin { + proxy_pass http://localhost:8083; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } } -} \ No newline at end of file +} diff --git a/layer-api/infra/production/nginx.green.conf b/layer-api/infra/production/nginx.green.conf index a7f4110b..9db8a8e1 100644 --- a/layer-api/infra/production/nginx.green.conf +++ b/layer-api/infra/production/nginx.green.conf @@ -8,6 +8,7 @@ http { server { listen 80; + # 기존 라우팅 (서비스 api) location / { proxy_pass http://layer-api; proxy_set_header Host $host; @@ -15,5 +16,14 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } + + # /admin 요청 라우팅 + location /admin { + proxy_pass http://localhost:8082; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } } -} \ No newline at end of file +}