-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
29 lines (28 loc) · 724 Bytes
/
Copy pathcompose.yml
File metadata and controls
29 lines (28 loc) · 724 Bytes
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
services:
app:
build: .
env_file: .env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: unless-stopped
postgres:
image: postgres:16-alpine3.20
volumes:
- ./db:/var/lib/postgresql
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?database password required}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_DATABASE: ${POSTGRES_DATABASE:-run-sh}
ports:
- "${POSTGRES_PORT:-5432}:5432"
restart: unless-stopped
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -d $${POSTGRES_DATABASE} -U $${POSTGRES_USER}",
]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s