services: minio: image: quay.io/minio/minio container_name: minio_storage restart: always env_file: "api/.env" ports: - "9000:9000" - "9001:9001" volumes: - minio_data:/data command: server --console-address ":9001" /data postgres: image: postgres:16 container_name: postgres_db restart: always env_file: "api/.env" ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data - ./db/init.sql:/docker-entrypoint-initdb.d/init.sql go_api: build: ./api container_name: go_api env_file: "api/.env" depends_on: - postgres ports: - "8080:8080" environment: - GOCACHE=/go-cache # Set custom Go cache directory volumes: - go_cache:/go-cache # Persist Go cache # test-runner: # build: # context: ./api # dockerfile: Dockerfile.test # depends_on: # - minio # environment: # - GOCACHE=/go-cache # Set custom Go cache directory # volumes: # - go_cache:/go-cache # Persist Go cache volumes: postgres_data: minio_data: go_cache: