-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (56 loc) · 1.31 KB
/
Copy pathdocker-compose.yml
File metadata and controls
60 lines (56 loc) · 1.31 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
version: '3.8'
services:
postgres:
image: postgres:15-alpine
container_name: nodestack-postgres
restart: unless-stopped
environment:
POSTGRES_DB: nodestack
POSTGRES_USER: nodestack
POSTGRES_PASSWORD: password
ports:
- "5434:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U nodestack -d nodestack"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: nodestack-redis
restart: unless-stopped
ports:
- "6380:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
nats:
image: nats:2.10-alpine
container_name: nodestack-nats
restart: unless-stopped
ports:
- "4223:4222"
- "8223:8222"
command: [
"--jetstream",
"--store_dir=/data",
"--http_port=8222"
]
volumes:
- nats_data:/data
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8222/healthz"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:
redis_data:
nats_data: