From 5bdaba01bd340b9a07d75f0e6a32aae5a3a4fee1 Mon Sep 17 00:00:00 2001 From: Variet Worker Date: Tue, 17 Mar 2026 07:18:57 +0900 Subject: [PATCH] =?UTF-8?q?fix(infra):=20docker-compose.yml=20=EC=84=9C?= =?UTF-8?q?=EB=B2=84=20=EC=8B=A4=EC=A0=9C=20=EA=B5=AC=EC=84=B1=20=EB=B0=98?= =?UTF-8?q?=EC=98=81=20+=20Caddyfile=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Caddyfile | 9 --------- docker-compose.yml | 39 +++++++++++++-------------------------- docker-compose_server.yml | 30 ++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 35 deletions(-) delete mode 100644 Caddyfile create mode 100644 docker-compose_server.yml diff --git a/Caddyfile b/Caddyfile deleted file mode 100644 index 1758eeb..0000000 --- a/Caddyfile +++ /dev/null @@ -1,9 +0,0 @@ -# Gravity Gateway — Caddy Reverse Proxy -# Automatic HTTPS via Let's Encrypt -# -# 도메인을 실제 도메인으로 변경하세요 (예: gateway.variet.net) -# Caddy가 자동으로 Let's Encrypt 인증서를 발급합니다. - -ag.variet.net { - reverse_proxy gateway:8585 -} diff --git a/docker-compose.yml b/docker-compose.yml index 98c7fea..9689aae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,41 +3,28 @@ services: build: . container_name: gravity-gateway restart: unless-stopped - # Port NOT exposed directly — Caddy handles external access - expose: - - "8585" + ports: + - "127.0.0.1:8585:8585" + env_file: + - .env environment: - - DISCORD_TOKEN=${DISCORD_TOKEN} - - DISCORD_GUILD_ID=${DISCORD_GUILD_ID} - BOT_MODE=gateway - GATEWAY_PORT=8585 - - GATEWAY_API_KEY=${GATEWAY_API_KEY} - - GRAVITY_HUB_SECRET=${GRAVITY_HUB_SECRET} - - GRAVITY_REGISTRATION_CODE=${GRAVITY_REGISTRATION_CODE} - BRAIN_PATH=/app/data/brain volumes: - gateway-data:/app/data + networks: + - default + - proxy-net logging: driver: json-file options: - max-size: "10m" - max-file: "3" - - caddy: - image: caddy:2-alpine - container_name: gravity-caddy - restart: unless-stopped - ports: - - "443:443" - - "80:80" - volumes: - - ./Caddyfile:/etc/caddy/Caddyfile:ro - - caddy-data:/data - - caddy-config:/config - depends_on: - - gateway + max-size: 10m + max-file: 3 volumes: gateway-data: - caddy-data: - caddy-config: + +networks: + proxy-net: + external: true diff --git a/docker-compose_server.yml b/docker-compose_server.yml new file mode 100644 index 0000000..9689aae --- /dev/null +++ b/docker-compose_server.yml @@ -0,0 +1,30 @@ +services: + gateway: + build: . + container_name: gravity-gateway + restart: unless-stopped + ports: + - "127.0.0.1:8585:8585" + env_file: + - .env + environment: + - BOT_MODE=gateway + - GATEWAY_PORT=8585 + - BRAIN_PATH=/app/data/brain + volumes: + - gateway-data:/app/data + networks: + - default + - proxy-net + logging: + driver: json-file + options: + max-size: 10m + max-file: 3 + +volumes: + gateway-data: + +networks: + proxy-net: + external: true