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

67 lines
1.4 KiB
Plaintext

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
ports:
- "8081:8080"
networks:
- ldpv2-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/api/actuator/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: ldpv2-frontend
depends_on:
- backend
ports:
- "4200:80"
networks:
- ldpv2-network
environment:
API_URL: http://backend:8081/api
volumes:
postgres_data:
networks:
ldpv2-network:
driver: bridge