version: "3.7"

services:
  app_proxy:
    environment:
      APP_HOST: localai_api_1
      APP_PORT: 8080
      PROXY_AUTH_WHITELIST: "/v1/*"
  api:
    image: localai/localai:v4.1.3@sha256:a6af99e17a73a92caa134e70ae84492cc47b67645c1676268a7522ad14f4c09d
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/readyz"]
      interval: 1m
      timeout: 20m
      retries: 5
    environment:
      - MODELS_PATH=/models
    volumes:
      - ${APP_DATA_DIR}/data/models:/models:cached
      - ${APP_DATA_DIR}/data/images/:/tmp/generated/images/
