-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
31 lines (29 loc) · 807 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
31 lines (29 loc) · 807 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
# Desarrollo local: solo la base de datos.
# Adminer (UI web para la DB) es opcional: docker compose --profile tools up -d
services:
db:
image: postgres:16-alpine
container_name: template-fullstack-db
environment:
POSTGRES_USER: ${DB_USER:-app}
POSTGRES_PASSWORD: ${DB_PASSWORD:-app}
POSTGRES_DB: ${DB_NAME:-template_fullstack}
ports:
- '${DB_PORT:-5432}:5432'
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DB_USER:-app} -d ${DB_NAME:-template_fullstack}']
interval: 5s
timeout: 5s
retries: 10
adminer:
image: adminer:4
profiles: ['tools']
ports:
- '${ADMINER_PORT:-8081}:8080'
depends_on:
db:
condition: service_healthy
volumes:
pgdata: