-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
105 lines (101 loc) ยท 2.84 KB
/
docker-compose.dev.yml
File metadata and controls
105 lines (101 loc) ยท 2.84 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# ========================================
# Finders API - Dev Blue-Green Override
# ========================================
# docker-compose.infra.yml (base) ์์ ๋ฎ์ด์ฐ๋ override ํ์ผ
#
# ์ฌ์ฉ๋ฒ:
# docker compose -f docker-compose.infra.yml -f docker-compose.dev.yml --profile blue up -d
# docker compose -f docker-compose.infra.yml -f docker-compose.dev.yml --profile green up -d
# ========================================
services:
# โโ Redis (dev ์ ์ฉ) โโ
redis-dev:
image: redis:8.0-alpine
container_name: finders-redis-dev
restart: unless-stopped
command: redis-server --save 60 1 --loglevel warning --maxmemory 128mb --maxmemory-policy allkeys-lru
volumes:
- redis-dev-data:/data
deploy:
resources:
limits:
memory: 256m
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- finders-network
# โโ Dev Blue โโ
dev-blue:
image: ${DOCKER_IMAGE:-findersofficial/finders-api}:dev
restart: unless-stopped
depends_on:
redis-dev:
condition: service_healthy
env_file:
- .env.dev
environment:
SPRING_PROFILES_ACTIVE: dev
TZ: Asia/Seoul
REDIS_HOST: finders-redis-dev
REDIS_PORT: 6379
REDIS_PASSWORD: ""
SPRING_DATA_REDIS_SSL_ENABLED: "false"
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/api/actuator/health"]
interval: 20s
timeout: 5s
retries: 5
start_period: 60s
labels:
- "traefik.enable=true"
- "traefik.http.routers.dev.rule=Host(`dev-api.finders.it.kr`)"
- "traefik.http.services.dev.loadbalancer.server.port=8080"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
profiles:
- blue
networks:
- finders-network
# โโ Dev Green โโ
dev-green:
image: ${DOCKER_IMAGE:-findersofficial/finders-api}:dev
restart: unless-stopped
depends_on:
redis-dev:
condition: service_healthy
env_file:
- .env.dev
environment:
SPRING_PROFILES_ACTIVE: dev
TZ: Asia/Seoul
REDIS_HOST: finders-redis-dev
REDIS_PORT: 6379
REDIS_PASSWORD: ""
SPRING_DATA_REDIS_SSL_ENABLED: "false"
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/api/actuator/health"]
interval: 20s
timeout: 5s
retries: 5
start_period: 60s
labels:
- "traefik.enable=true"
- "traefik.http.routers.dev.rule=Host(`dev-api.finders.it.kr`)"
- "traefik.http.services.dev.loadbalancer.server.port=8080"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
profiles:
- green
networks:
- finders-network
volumes:
redis-dev-data: