-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (40 loc) · 1.37 KB
/
Copy pathdocker-compose.yml
File metadata and controls
43 lines (40 loc) · 1.37 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
# Stack completo: la app y su base de datos.
#
# cp .env.example .env (y editalo)
# docker compose up -d
#
# Las migraciones se aplican solas al arrancar el contenedor.
services:
app:
build: .
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
# Se arma acá a partir de las POSTGRES_* para no repetir la contraseña
# en dos lugares. Pisa el DATABASE_URL del .env, que es el de desarrollo.
DATABASE_URL: postgresql://${POSTGRES_USER:-vaquita}:${POSTGRES_PASSWORD:?falta POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB:-vaquita}?schema=public
AUTH_SECRET: ${AUTH_SECRET:?falta AUTH_SECRET}
APP_URL: ${APP_URL:?falta APP_URL}
BOOTSTRAP_ADMIN_EMAIL: ${BOOTSTRAP_ADMIN_EMAIL:?falta BOOTSTRAP_ADMIN_EMAIL}
TZ: ${TZ:-America/Argentina/Buenos_Aires}
ports:
- "${APP_PORT:-3000}:3000"
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-vaquita}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?falta POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-vaquita}
TZ: ${TZ:-America/Argentina/Buenos_Aires}
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-vaquita}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
db-data: