version: '3.8' # Use a recent version services: # --- Web API --- api: build: context: . ssh: ["default"] container_name: soaricarus ports: - "8000:8000" env_file: - .env depends_on: main_db: condition: service_healthy networks: - soaricarus-network restart: unless-stopped # --- Web API auth --- auth_api: build: context: ../soaricarus_auth # IMPORTANT: Relative path to the local checkout of your web API repo (containing the Dockerfile) ssh: ["default"] dockerfile: Dockerfile # Optional: Specify if your Dockerfile has a non-standard name container_name: auth_api restart: unless-stopped ports: - "8001:8001" env_file: - ../soaricarus_auth/.env depends_on: auth_db: condition: service_healthy networks: - soaricarus-network # Optional: Mount local code for development (live reload) # volumes: # - ./path/to/your/web-api-repo:/app # --- songparser service --- songparser: build: context: ../songparser ssh: ["default"] dockerfile: Dockerfile container_name: songparser restart: unless-stopped env_file: - ../songparser/.env depends_on: - api - main_db - auth_api - auth_db networks: - soaricarus-network # --- storage service --- maze: image: dxflrs/garage:v2.3.0 container_name: maze restart: unless-stopped ports: - "3900:3900" # S3 API - "3901:3901" # RPC for cluster communication - "3902:3902" # S3 web interface - "3903:3903" # Admin API volumes: - ./garage.toml:/etc/garage.toml:ro - object_data:/var/lib/garage env_file: - .env healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:3901/v0/status || exit 1"] interval: 10s timeout: 5s retries: 5 start_period: 30s networks: - soaricarus-network # PostgreSQL Database Service main_db: image: postgres:18.4-alpine container_name: soaricarus_db environment: # These MUST match the user, password, and database name in the DATABASE_URL above POSTGRES_USER: ${POSTGRES_MAIN_USER:-soaricarus} POSTGRES_PASSWORD: ${POSTGRES_MAIN_PASSWORD:-password} POSTGRES_DB: ${POSTGRES_MAIN_DB:-soaricarus_db} volumes: # Persist database data using a named volume - postgres_data:/var/lib/postgresql ports: - "5432:5432" healthcheck: # Checks if Postgres is ready to accept connections test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] interval: 10s timeout: 5s retries: 5 start_period: 10s restart: always networks: - soaricarus-network # --- soaricarus web auth api db --- auth_db: image: postgres:18.4-alpine container_name: soaricarus_auth_db environment: # These MUST match the user, password, and database name in the DATABASE_URL above POSTGRES_USER: ${POSTGRES_AUTH_USER:-soaricarus_op} POSTGRES_PASSWORD: ${POSTGRES_AUTH_PASSWORD:-password} POSTGRES_DB: ${POSTGRES_AUTH_DB:-soaricarus_auth_db} volumes: # Persist database data using a named volume - postgres_data_auth:/var/lib/postgresql ports: - "5433:5432" healthcheck: # Checks if Postgres is ready to accept connections test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] interval: 10s timeout: 5s retries: 5 start_period: 10s restart: always networks: - soaricarus-network volumes: postgres_data: driver: local # Use the default local driver postgres_data_auth: driver: local # Use the default local driver object_data: driver: local # Use the default local driver networks: soaricarus-network: driver: bridge