services: postgres: image: postgres:16-alpine container_name: buhapp-postgres restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-buhapp} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-buhapp_secret} POSTGRES_DB: ${POSTGRES_DB:-buhapp} volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER}"] interval: 5s timeout: 3s retries: 5 redis: image: redis:7-alpine container_name: buhapp-redis restart: unless-stopped command: ["redis-server", "--appendonly", "yes"] volumes: - redis_data:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 5 minio: image: minio/minio:latest container_name: buhapp-minio restart: unless-stopped environment: MINIO_ROOT_USER: ${MINIO_ACCESS_KEY:-buhapp_minio} MINIO_ROOT_PASSWORD: ${MINIO_SECRET_KEY:-buhapp_minio_secret} command: ["server", "/data", "--console-address", ":9001"] volumes: - minio_data:/data healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] interval: 5s timeout: 3s retries: 5 api: build: context: . dockerfile: Dockerfile container_name: buhapp-api restart: unless-stopped env_file: - .env environment: POSTGRES_HOST: postgres REDIS_HOST: redis MINIO_ENDPOINT: minio:9000 depends_on: postgres: condition: service_healthy redis: condition: service_healthy minio: condition: service_healthy ports: - "8080:8080" volumes: postgres_data: redis_data: minio_data: