2020-12-21 18:39:53 +00:00
|
|
|
version: "3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
libretranslate:
|
|
|
|
container_name: libretranslate
|
2023-01-12 13:23:29 +00:00
|
|
|
build:
|
|
|
|
context: .
|
2023-01-31 14:53:03 +00:00
|
|
|
dockerfile: docker/Dockerfile
|
2020-12-21 18:39:53 +00:00
|
|
|
restart: unless-stopped
|
|
|
|
ports:
|
2023-01-12 13:23:29 +00:00
|
|
|
- "5000:5000"
|
2024-01-24 21:04:34 +00:00
|
|
|
## Uncomment this for logging in docker compose logs
|
|
|
|
# tty: true
|
2023-01-15 21:20:47 +00:00
|
|
|
healthcheck:
|
2024-01-24 21:04:34 +00:00
|
|
|
test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py']
|
2020-12-21 18:39:53 +00:00
|
|
|
## Uncomment above command and define your args if necessary
|
2022-07-15 11:22:04 +00:00
|
|
|
# command: --ssl --ga-id MY-GA-ID --req-limit 100 --char-limit 500
|
2024-01-24 21:04:34 +00:00
|
|
|
## Uncomment this section and the libretranslate_api_keys volume if you want to backup your API keys
|
2022-07-15 11:22:04 +00:00
|
|
|
# environment:
|
2024-01-24 21:04:34 +00:00
|
|
|
# - LT_API_KEYS=true
|
2022-07-15 11:22:04 +00:00
|
|
|
# - LT_API_KEYS_DB_PATH=/app/db/api_keys.db # Same result as `db/api_keys.db` or `./db/api_keys.db`
|
2024-01-24 21:04:34 +00:00
|
|
|
## Uncomment these vars and libretranslate_models volume to optimize loading time.
|
|
|
|
# - LT_UPDATE_MODELS=true
|
|
|
|
# - LT_LOAD_ONLY=en,fr
|
2022-07-15 11:22:04 +00:00
|
|
|
# volumes:
|
2024-01-24 21:04:34 +00:00
|
|
|
# - libretranslate_api_keys:/app/db
|
|
|
|
# Keep the models in a docker volume, to avoid re-downloading on startup
|
|
|
|
# - libretranslate_models:/home/libretranslate/.local:rw
|
2022-07-15 11:22:04 +00:00
|
|
|
|
|
|
|
# volumes:
|
2023-01-12 13:23:29 +00:00
|
|
|
# libretranslate_api_keys:
|
2024-01-24 21:04:34 +00:00
|
|
|
# libretranslate_models:
|