services: postgres: image: postgres:15-alpine environment: POSTGRES_USER: messenger POSTGRES_PASSWORD: messenger POSTGRES_DB: messenger volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U messenger"] interval: 5s timeout: 5s retries: 5 minio: image: pgsty/minio:RELEASE.2026-08-04T00-00-00Z command: server /data --console-address ":9001" environment: MINIO_ROOT_USER: minioadmin MINIO_ROOT_PASSWORD: minioadmin volumes: - minio_data:/data ports: - "127.0.0.1:9000:9000" - "127.0.0.1:9001:9001" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] interval: 5s timeout: 5s retries: 5 api: build: . environment: - SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/messenger - SPRING_DATASOURCE_USERNAME=messenger - SPRING_DATASOURCE_PASSWORD=messenger - APP_PORT=8080 - S3_ENDPOINT=http://minio:9000 - S3_ACCESS_KEY=minioadmin - S3_SECRET_KEY=minioadmin - S3_BUCKET=messenger-attachments - S3_REGION=us-east-1 depends_on: postgres: condition: service_healthy minio: condition: service_healthy healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:8080/health/live"] interval: 5s timeout: 3s retries: 3 nginx: image: nginx:1.25-alpine ports: - "127.0.0.1:8080:80" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro depends_on: api: condition: service_healthy volumes: pgdata: minio_data: