diff --git a/.github/workflows/aws-cicd-dev.yml b/.github/workflows/aws-cicd-dev.yml index 9fdcb789..37627514 100644 --- a/.github/workflows/aws-cicd-dev.yml +++ b/.github/workflows/aws-cicd-dev.yml @@ -4,7 +4,7 @@ on: push: branches: - develop - - feat/LA-20 + - feat/LA-20_3 env: REGISTRY: "docker.io" diff --git a/.github/workflows/aws-cicd-prod.yml b/.github/workflows/aws-cicd-prod.yml index 120105e4..33aa5669 100644 --- a/.github/workflows/aws-cicd-prod.yml +++ b/.github/workflows/aws-cicd-prod.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - chore/migration 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-admin/src/main/resources/application-dev.yml b/layer-admin/src/main/resources/application-dev.yml index 941c6352..b68b603a 100644 --- a/layer-admin/src/main/resources/application-dev.yml +++ b/layer-admin/src/main/resources/application-dev.yml @@ -9,6 +9,9 @@ spring: username: ${AWS_PROD_DB_NAME} password: ${AWS_PROD_DB_PASSWORD} driver-class-name: com.mysql.cj.jdbc.Driver + hikari: + maximum-pool-size: 5 # 최대 pool 크기 + minimum-idle: 5 # 최소 pool 크기 jpa: hibernate: ddl-auto: validate diff --git a/layer-admin/src/main/resources/application-prod.yml b/layer-admin/src/main/resources/application-prod.yml index d053cad6..54120ad1 100644 --- a/layer-admin/src/main/resources/application-prod.yml +++ b/layer-admin/src/main/resources/application-prod.yml @@ -9,6 +9,9 @@ spring: username: ${AWS_PROD_DB_NAME} password: ${AWS_PROD_DB_PASSWORD} driver-class-name: com.mysql.cj.jdbc.Driver + hikari: + maximum-pool-size: 5 # 최대 pool 크기 + minimum-idle: 5 # 최소 pool 크기 jpa: hibernate: ddl-auto: validate diff --git a/layer-api/infra/development/nginx.conf b/layer-api/infra/development/nginx.conf index 639490fb..fabe06a6 100644 --- a/layer-api/infra/development/nginx.conf +++ b/layer-api/infra/development/nginx.conf @@ -9,8 +9,10 @@ http { server layer-admin:3000; } + # api.layerapp.io에 대한 서버 블록 server { listen 80; + server_name api.layerapp.io; location / { proxy_pass http://layer-api; @@ -19,9 +21,15 @@ http { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } + } - location /admin/ { - proxy_pass http://layer-admin; # Proxy to layer-admin + # admin.api.layerapp.io에 대한 서버 블록 + server { + listen 80; + server_name admin-dev.layerapp.io; + + location / { + proxy_pass http://layer-admin; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/layer-api/infra/production/docker-compose-blue.yaml b/layer-api/infra/production/docker-compose-blue.yaml index 82d57859..1f7311d0 100644 --- a/layer-api/infra/production/docker-compose-blue.yaml +++ b/layer-api/infra/production/docker-compose-blue.yaml @@ -29,5 +29,23 @@ services: - layer-api-blue restart: always + admin-app-blue: + image: docker.io/clean01/layer-server_layer-admin:latest # + container_name: layer-admin-blue + ports: + - "3001:3000" + environment: + - TZ=Asia/Seoul + - SPRING_PROFILES_ACTIVE=prod + volumes: + - ./application-secret.properties:/config/application-secret.properties + - ./log:/log + - ./tokens:/config/tokens + networks: + - app-network + depends_on: + - layer-api-blue + restart: always + networks: app-network: \ No newline at end of file diff --git a/layer-api/infra/production/docker-compose-green.yaml b/layer-api/infra/production/docker-compose-green.yaml index bf36a0b6..9df97019 100644 --- a/layer-api/infra/production/docker-compose-green.yaml +++ b/layer-api/infra/production/docker-compose-green.yaml @@ -29,5 +29,23 @@ services: - layer-api-green restart: always + admin-app-green: + image: docker.io/clean01/layer-server_layer-admin:latest # + container_name: layer-admin-green + ports: + - "3000:3000" + environment: + - TZ=Asia/Seoul + - SPRING_PROFILES_ACTIVE=prod + volumes: + - ./application-secret.properties:/config/application-secret.properties + - ./log:/log + - ./tokens:/config/tokens + networks: + - app-network + depends_on: + - layer-api-green + restart: always + networks: app-network: \ No newline at end of file diff --git a/layer-api/infra/production/nginx.blue.conf b/layer-api/infra/production/nginx.blue.conf index 326ea474..d8486355 100644 --- a/layer-api/infra/production/nginx.blue.conf +++ b/layer-api/infra/production/nginx.blue.conf @@ -5,8 +5,14 @@ http { server localhost:8081; } + upstream layer-admin { + server localhost:3001; + } + + # api.layerapp.io에 대한 서버 블록 server { listen 80; + server_name api.layerapp.io; location / { proxy_pass http://layer-api; @@ -16,4 +22,18 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } } -} \ No newline at end of file + + # admin.api.layerapp.io에 대한 서버 블록 + server { + listen 80; + server_name admin-prod.layerapp.io; + + location / { + proxy_pass http://layer-admin; + 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; + } + } +} diff --git a/layer-api/infra/production/nginx.conf b/layer-api/infra/production/nginx.conf deleted file mode 100644 index 4bcbe484..00000000 --- a/layer-api/infra/production/nginx.conf +++ /dev/null @@ -1,19 +0,0 @@ -events { } - -http { - upstream layer-api { - server layer-api:8080; - } - - server { - listen 80; - - location / { - proxy_pass http://layer-api; - 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..f03454f1 100644 --- a/layer-api/infra/production/nginx.green.conf +++ b/layer-api/infra/production/nginx.green.conf @@ -5,8 +5,14 @@ http { server localhost:8080; } + upstream layer-admin { + server localhost:3000; + } + + # api.layerapp.io에 대한 서버 블록 server { listen 80; + server_name api.layerapp.io; location / { proxy_pass http://layer-api; @@ -16,4 +22,18 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } } -} \ No newline at end of file + + # admin.api.layerapp.io에 대한 서버 블록 + server { + listen 80; + server_name admin-prod.layerapp.io; + + location / { + proxy_pass http://layer-admin; + 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; + } + } +} diff --git a/layer-batch/src/main/resources/application.yml b/layer-batch/src/main/resources/application.yml index 07de1fe2..d009e947 100644 --- a/layer-batch/src/main/resources/application.yml +++ b/layer-batch/src/main/resources/application.yml @@ -9,6 +9,9 @@ spring: username: ${AWS_PROD_DB_NAME} password: ${AWS_PROD_DB_PASSWORD} driver-class-name: com.mysql.cj.jdbc.Driver + hikari: + maximum-pool-size: 5 # 최대 pool 크기 + minimum-idle: 5 # 최소 pool 크기 jpa: hibernate: ddl-auto: validate