version: '3.8' services: postgres: image: postgres:14-alpine container_name: administration-postgres command: - "postgres" - "-c" - "max_wal_size=2GB" - "-c" - "checkpoint_timeout=15min" - "-c" - "wal_buffers=64MB" environment: POSTGRES_DB: administration_data POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: - "5433:5432" # Use 5433 on host to avoid conflict with local PostgreSQL volumes: - postgres_data:/var/lib/postgresql/data - ./database/init:/docker-entrypoint-initdb.d:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d administration_data"] interval: 10s timeout: 5s retries: 5 networks: - administration-network indexer: image: bloxbean/yaci-store:2.0.0 container_name: administration-indexer depends_on: postgres: condition: service_healthy env_file: - .env environment: - JAVA_OPTS=-Xmx2g -Xms1g ports: - "8081:8080" volumes: - ./indexer/application.properties:/app/config/application.properties:ro - ./indexer/config/application-plugins.yml:/app/config/application-plugins.yml:ro - ./indexer/plugins:/app/plugins - ./indexer/logs:/app/logs restart: unless-stopped networks: - administration-network api: build: context: ./api dockerfile: Dockerfile container_name: administration-api depends_on: postgres: condition: service_healthy environment: - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/administration_data - RUST_LOG=info ports: - "8080:8080" restart: unless-stopped networks: - administration-network volumes: postgres_data: networks: administration-network: driver: bridge