Files
core/docker-compose.yml
T
2025-09-12 10:07:05 +05:00

56 lines
1.3 KiB
YAML

version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: konturai-postgres
environment:
POSTGRES_DB: konturai
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
- ./src/main/resources/db/migration:/docker-entrypoint-initdb.d
networks:
- konturai-network
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres -d konturai']
interval: 10s
timeout: 5s
retries: 5
# Spring Boot Application
app:
build:
context: .
dockerfile: Dockerfile
container_name: konturai-app
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/konturai
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
SPRING_JPA_HIBERNATE_DDL_AUTO: none
ports:
- '8080:8080'
depends_on:
postgres:
condition: service_healthy
networks:
- konturai-network
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/actuator/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
volumes:
postgres_data:
networks:
konturai-network:
driver: bridge