Files
ldpv2/docker-compose.yml
T
2026-02-07 20:14:12 +01:00

63 lines
1.3 KiB
YAML

version: '3.8'
services:
postgres:
image: postgres:16-alpine
container_name: ldpv2-postgres
environment:
POSTGRES_DB: ldpv2
POSTGRES_USER: ldpv2_user
POSTGRES_PASSWORD: ldpv2_password
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- ldpv2-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ldpv2_user -d ldpv2"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: ldpv2-backend
depends_on:
postgres:
condition: service_healthy
environment:
DB_HOST: postgres
DB_USERNAME: ldpv2_user
DB_PASSWORD: ldpv2_password
JWT_SECRET: your-secret-key-change-in-production-minimum-512-bits-for-hs512-algorithm
networks:
- ldpv2-network
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "/api/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
app:
build:
context: .
dockerfile: Dockerfile.app
container_name: ldpv2-app
depends_on:
backend:
condition: service_healthy
ports:
- "80:80"
networks:
- ldpv2-network
volumes:
postgres_data:
networks:
ldpv2-network:
driver: bridge