54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: mtgsearch-db
|
|
environment:
|
|
POSTGRES_DB: mtgsearch
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: mtgsearch-backend
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/mtgsearch
|
|
SPRING_DATASOURCE_USERNAME: postgres
|
|
SPRING_DATASOURCE_PASSWORD: postgres
|
|
SPRING_JPA_HIBERNATE_DDL_AUTO: validate
|
|
JWT_SECRET: ${JWT_SECRET:-your-secret-key-change-in-production}
|
|
JWT_EXPIRATION: 86400
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/api/v1/auth/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
volumes:
|
|
postgres_data:
|
|
driver: local
|
|
|
|
networks:
|
|
default:
|
|
name: mtgsearch-network
|