-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.infra.yml
More file actions
55 lines (52 loc) ยท 1.6 KB
/
docker-compose.infra.yml
File metadata and controls
55 lines (52 loc) ยท 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# ========================================
# Finders API - ๊ณตํต ์ธํ๋ผ Base (์๋ฒ ๋ฐฐํฌ์ฉ)
# ========================================
# Blue-Green ๋ฐฐํฌ ๊ณตํต ์๋น์ค: Traefik (๋ฆฌ๋ฒ์ค ํ๋ก์) + cloudflared (ํฐ๋)
#
# ์ฌ์ฉ๋ฒ:
# ์ด ํ์ผ์ ๋จ๋
์คํํ์ง ์๊ณ , override ํ์ผ๊ณผ ํจ๊ป ์ฌ์ฉํฉ๋๋ค.
# docker compose -f docker-compose.infra.yml -f docker-compose.prod.yml up -d
# docker compose -f docker-compose.infra.yml -f docker-compose.dev.yml up -d
#
# Note:
# ๋ก์ปฌ ๊ฐ๋ฐ์ฉ ํ์ผ์ docker-compose.yml ์ ์ฐธ๊ณ ํ์ธ์.
# ========================================
services:
# โโ Traefik (๋ฆฌ๋ฒ์ค ํ๋ก์) โโ
traefik:
image: traefik:v3
container_name: finders-traefik
restart: unless-stopped
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--ping=true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
healthcheck:
test: ["CMD", "traefik", "healthcheck", "--ping"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
labels:
- "traefik.enable=false"
networks:
- finders-network
# โโ Cloudflare Tunnel โโ
cloudflared:
image: cloudflare/cloudflared:latest
container_name: finders-tunnel
restart: unless-stopped
command: tunnel run --protocol http2
environment:
- TUNNEL_TOKEN=${TUNNEL_TOKEN}
depends_on:
traefik:
condition: service_healthy
networks:
- finders-network
networks:
finders-network:
external: true