프로젝트 구성
- Eureka Server
- Gateway Server
- Service Server
- Auth Server
version: "3"
services:
blue_eureka:
container_name: blue_eureka
image: docker.io/pudingles94/ai_blue_eureka:latest
ports:
- "19090:19090"
environment:
TZ: "Asia/Seoul"
EUREKA_SERVICE_URL: "http://host.docker.internal:19090/eureka/"
EUREKA_SERVER_HOST: "localhost"
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
blue_gateway:
container_name: blue_gateway
image: docker.io/pudingles94/ai_blue_gateway:latest
ports:
- "19091:19091"
depends_on:
- blue_eureka
environment:
TZ: "Asia/Seoul"
REDIS_HOST: "host.docker.internal"
REDIS_PORT: "6379"
REDIS_PASS: "{REDIS_PASS}"
SERVER_HOST: "host.docker.internal"
GATEWAY_PORT: "19091"
SERVER_SWAGGER_HOST: "{SERVER_SWAGGER_HOST}"
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
blue_service:
container_name: blue_service
image: docker.io/pudingles94/ai_blue_service:latest
ports:
- "19092:19092"
depends_on:
- blue_eureka
environment:
TZ: "Asia/Seoul"
POSTGRESQL_HOST: "{POSTGRESQL_HOST}"
POSTGRESQL_PORT: "5432"
POSTGRESQL_ID: "{POSTGRESQL_ID}"
POSTGRESQL_PASS: "{POSTGRESQL_PASS}"
REDIS_HOST: "host.docker.internal"
REDIS_PORT: "6379"
REDIS_PASS: "{REDIS_PASS}"
SERVER_HOST: "host.docker.internal"
GATEWAY_PORT: "19091"
SERVER_SWAGGER_HOST: "{SERVER_SWAGGER_HOST}"
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
blue_auth:
container_name: blue_auth
image: docker.io/pudingles94/ai_blue_auth:latest
ports:
- "19093:19093"
depends_on:
- blue_eureka
environment:
TZ: "Asia/Seoul"
POSTGRESQL_HOST: "{POSTGRESQL_HOST}"
POSTGRESQL_PORT: "5432"
POSTGRESQL_ID: "{POSTGRESQL_ID}"
POSTGRESQL_PASS: "{POSTGRESQL_PASS}"
REDIS_HOST: "host.docker.internal"
REDIS_PORT: "6379"
REDIS_PASS: "{REDIS_PASS}"
SERVER_HOST: "host.docker.internal"
GATEWAY_PORT: "19091"
SERVER_SWAGGER_HOST: "{SERVER_SWAGGER_HOST}"
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
extra_hosts
로 host.docker.internal
을 추가해줌SERVER_SWAGGER_HOST
에 public 호스트를 입력해줌SERVER_SWAGGER_HOST
를 cors 설정에 추가하도록 해뒀음