docker-compose.yml
Rama main · réplica de lectura del repositorio original.
version: '3.8'
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: linkas
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations/001_init.sql:/docker-entrypoint-initdb.d/001_init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
api:
build: .
ports:
- "8080:8080"
environment:
PORT: "8080"
DATABASE_URL: "postgres://postgres:postgres@postgres:5432/linkas?sslmode=disable"
BASE_URL: "http://localhost:8080"
depends_on:
postgres:
condition: service_healthy
volumes:
postgres_data: