-
Notifications
You must be signed in to change notification settings - Fork 14
/
docker-compose.yml
82 lines (79 loc) · 1.94 KB
/
docker-compose.yml
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
services:
121db:
container_name: 121db
image: 'postgres:14'
init: true
env_file: .env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DBNAME}
volumes:
- './postgresql.conf:/etc/postgresql.conf'
- './init.sql:/docker-entrypoint-initdb.d/init.sql'
ports:
- '5438:5432'
restart: unless-stopped
healthcheck:
test:
[
'CMD-SHELL',
"sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DBNAME}'",
]
interval: 10s
timeout: 3s
retries: 3
121-redis:
container_name: 121queue
# Version 4.0.x & 6.0.x are supported by Azure Cache for Redis
image: 'redis:6.0-alpine'
ports:
- '6379:6379'
mock-service:
container_name: mock-service
build:
context: mock-service
target: production
init: true
env_file: .env
environment:
- GLOBAL_121_VERSION
ports:
- '${PORT_MOCK_SERVICE}:${PORT_MOCK_SERVICE}'
stdin_open: true
tty: true
restart: on-failure
healthcheck:
test: curl --fail http://mock-service:${PORT_MOCK_SERVICE}/api/instance/version || exit 1
interval: 15s
retries: 15
start_period: 60s
timeout: 300s
121-service:
container_name: 121-service
build:
context: 121-service
target: production
init: true
env_file: .env
environment:
- GLOBAL_121_VERSION
ports:
- '${PORT_121_SERVICE}:${PORT_121_SERVICE}'
stdin_open: true
tty: true
depends_on:
121-redis:
condition: service_started
required: true
121db:
condition: service_healthy
required: true
restart: true
restart: on-failure
healthcheck:
test: curl --fail http://localhost:${PORT_121_SERVICE}/api/organization || exit 1
interval: 15s
retries: 15
start_period: 60s
timeout: 300s