-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
68 lines (63 loc) · 1.52 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
68 lines (63 loc) · 1.52 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
version: '3.8'
services:
elasticsearch:
image: elasticsearch:8.18.0
container_name: callcare-elasticsearch
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- ES_JAVA_OPTS=-Xms256m -Xmx256m
mem_limit: 512m
memswap_limit: 512m
volumes:
- es-data:/usr/share/elasticsearch/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health | grep -q '\"status\":\"green\"\\|\"status\":\"yellow\"'"]
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:7.2
container_name: callcare-redis
volumes:
- redis-data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
app-blue:
image: ${DOCKER_IMAGE}:${IMAGE_TAG}
container_name: callcare-blue
ports:
- "8080:8080"
env_file:
- .env
environment:
SPRING_PROFILES_ACTIVE: prod
depends_on:
elasticsearch:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
app-green:
image: ${DOCKER_IMAGE}:${IMAGE_TAG}
container_name: callcare-green
ports:
- "8081:8080"
env_file:
- .env
environment:
SPRING_PROFILES_ACTIVE: prod
depends_on:
elasticsearch:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
volumes:
es-data:
redis-data: