Files
todo/docker-compose.yml
almazlar 386f5137c6
All checks were successful
Release and Build Docker Images / release-and-build (push) Successful in 1m38s
fix: update Dockerfile, application properties, and controller mappings for health check and CORS support
2026-02-22 14:08:31 +03:00

52 lines
1.1 KiB
YAML

version: '3.8'
services:
db:
image: postgres:15
container_name: todo-db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: tododb
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
backend:
build: ./backend
container_name: todo-backend
ports:
- "8082:8082"
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://db:5432/tododb
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=postgres
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8082/api/actuator/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
frontend:
build:
context: ./frontend
container_name: todo-frontend
ports:
- "5173:80"
depends_on:
backend:
condition: service_healthy
volumes:
postgres_data: