komga/docker-compose-test.yml
duong.doan1 7750b593f6 refactor: simplify Docker build setup
- Remove all simple Docker files (Dockerfile.simple, Dockerfile.simple-local, build-simple-docker.sh)
- Remove docker-compose.local.yml
- Update docker-compose.yml to use Dockerfile.local for builds
- Update build-local-docker.sh as the single build script
- Keep only multi-stage Dockerfile.local for comprehensive local builds
2026-04-07 18:29:00 +07:00

43 lines
No EOL
1.1 KiB
YAML

version: '3.8'
services:
postgres-test:
image: postgres:15-alpine
container_name: komga-postgres-test
environment:
POSTGRES_DB: komga_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5433:5432"
volumes:
- postgres_test_data:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
command: ["postgres", "-c", "log_statement=all"] # Log all SQL for debugging
komga-test:
image: gotson/komga:latest
container_name: komga-test-backend
depends_on:
postgres-test:
condition: service_healthy
environment:
SPRING_PROFILES_ACTIVE: test
KOMGA_DATABASE_TYPE: postgresql
KOMGA_DATABASE_URL: jdbc:postgresql://postgres-test:5432/komga_test
KOMGA_DATABASE_USERNAME: postgres
KOMGA_DATABASE_PASSWORD: postgres
KOMGA_CONFIG_DIR: /tmp/komga-test
ports:
- "25601:25600"
volumes:
- ./data:/data:ro
restart: "no"
volumes:
postgres_test_data: