-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (55 loc) · 1.26 KB
/
docker-compose.yml
File metadata and controls
58 lines (55 loc) · 1.26 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
version: "3.9"
services:
database:
image: postgres:17
restart: unless-stopped
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- PGUSER=postgres
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
ports:
- "8037:5432"
healthcheck:
test: "pg_isready"
interval: 30s
timeout: 5s
retries: 2
autoheal:
restart: always
image: willfarrell/autoheal
environment:
- AUTOHEAL_START_PERIOD=30
- AUTOHEAL_INTERVAL=30
volumes:
- /var/run/docker.sock:/var/run/docker.sock
dmob_database:
image: postgres:13
restart: unless-stopped
environment:
- PRIVATE_KEY=${DMOB_DATABASE_PRIVATE_KEY}
depends_on:
autoheal:
condition: service_healthy
ports:
- "3001:3001"
command: >
sh -c '
apt update && \
apt install -y openssh-client && \
echo "$$PRIVATE_KEY" > ./private_key && \
chmod 600 ./private_key && \
$DMOB_CONNECTION_STRING -i ./private_key
'
healthcheck:
test: "pg_isready -h localhost -p 3001"
interval: 30s
timeout: 5s
retries: 2
labels:
- "autoheal=true"
volumes:
postgres_data:
driver: local