-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (44 loc) · 1.38 KB
/
docker-compose.yml
File metadata and controls
45 lines (44 loc) · 1.38 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
services:
etcd:
image: quay.io/coreos/etcd:v3.5.21
ports:
- "127.0.0.1:2379:2379"
tmpfs:
- /etcd-data
command:
- etcd
- --name=node1
- --data-dir=/etcd-data
- --listen-client-urls=http://0.0.0.0:2379
- --advertise-client-urls=http://127.0.0.1:2379
- --listen-peer-urls=http://0.0.0.0:2380
- --initial-advertise-peer-urls=http://node1:2380
- --initial-cluster=node1=http://node1:2380
- --initial-cluster-token=gossip-rs-dev-cluster
- --initial-cluster-state=new
- --auto-compaction-mode=revision
- --auto-compaction-retention=0
healthcheck:
test: ["CMD", "etcdctl", "endpoint", "health", "--endpoints=http://localhost:2379"]
interval: 2s
timeout: 5s
retries: 5
start_period: 5s
postgres:
image: postgres:18-alpine
ports:
- "127.0.0.1:5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
tmpfs:
- /var/lib/postgresql
volumes:
- ./docker/init-databases.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres && psql -U postgres -d done_ledger -c 'SELECT 1' > /dev/null 2>&1 && psql -U postgres -d findings -c 'SELECT 1' > /dev/null 2>&1"]
interval: 2s
timeout: 5s
retries: 5
start_period: 5s