32 lines
No EOL
1.1 KiB
Django/Jinja
32 lines
No EOL
1.1 KiB
Django/Jinja
---
|
|
services:
|
|
api:
|
|
image: localai/localai:${LOCALAI_VERSION}
|
|
container_name: localai
|
|
networks:
|
|
- traefik
|
|
volumes:
|
|
- ./data/models:/models:cached
|
|
environment:
|
|
- DEBUG=true
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.docker.network=traefik"
|
|
- "traefik.http.routers.localai.entrypoints=http"
|
|
- "traefik.http.routers.localai.rule=Host(`${LOCALAI_DOMAIN}`)"
|
|
- "traefik.http.middlewares.localai-https-redirect.redirectscheme.scheme=https"
|
|
- "traefik.http.routers.localai.middlewares=localai-https-redirect"
|
|
- "traefik.http.routers.localai-secure.entrypoints=https"
|
|
- "traefik.http.routers.localai-secure.rule=Host(`${LOCALAI_DOMAIN}`)"
|
|
- "traefik.http.routers.localai-secure.tls=true"
|
|
- "traefik.http.routers.localai-secure.service=localai"
|
|
- "traefik.http.services.localai.loadbalancer.server.port=8080"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8080/readyz"]
|
|
interval: 1m
|
|
timeout: 20m
|
|
retries: 5
|
|
|
|
networks:
|
|
traefik:
|
|
external: true |