forked from Bitcoindefi/OpenAO
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.postgres.yml
More file actions
31 lines (29 loc) · 928 Bytes
/
Copy pathdocker-compose.postgres.yml
File metadata and controls
31 lines (29 loc) · 928 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
30
31
name: aoweb-postgres
services:
postgres:
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-aoweb}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
ports:
- "127.0.0.1:5432:5432"
volumes:
# postgres:18+ exige el mount en /var/lib/postgresql, NO en .../data.
# Los datos quedan en un subdirectorio por version mayor para que
# "pg_upgrade --link" no cruce un limite de punto de montaje.
# Con la ruta vieja el contenedor no arranca.
- postgres_data:/var/lib/postgresql
- ./schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-aoweb}",
]
interval: 10s
timeout: 5s
retries: 10
volumes:
postgres_data: