2024-05-28 06:11:48 +00:00
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
services:
|
|
|
|
app_proxy:
|
|
|
|
environment:
|
|
|
|
APP_HOST: libretranslate_main_1
|
|
|
|
APP_PORT: 5000
|
|
|
|
PROXY_AUTH_ADD: "false"
|
|
|
|
main:
|
2024-09-24 00:29:39 +00:00
|
|
|
image: libretranslate/libretranslate:v1.6.1@sha256:0a0959ff057259f769a49ec92f968095e5bbd689aef436b9159a5ef8319dc65f
|
2024-05-28 06:11:48 +00:00
|
|
|
restart: on-failure
|
|
|
|
|
|
|
|
## Log to docker compose logs. This allows you to see the model download progress when first installing.
|
|
|
|
tty: true
|
|
|
|
healthcheck:
|
|
|
|
test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py']
|
|
|
|
## Uncomment above command and define your args if necessary
|
|
|
|
# command: --ssl --ga-id MY-GA-ID --req-limit 100 --char-limit 500
|
|
|
|
## Uncomment this section and the libretranslate_api_keys volume if you want to backup your API keys
|
|
|
|
environment:
|
|
|
|
- LT_API_KEYS=true
|
|
|
|
- LT_API_KEYS_DB_PATH=/app/db/api_keys.db # Same result as `db/api_keys.db` or `./db/api_keys.db`
|
|
|
|
## Uncomment these vars and libretranslate_models volume to optimize loading time.
|
|
|
|
- LT_UPDATE_MODELS=true
|
|
|
|
## - LT_LOAD_ONLY=en,fr
|
|
|
|
volumes:
|
|
|
|
- ${APP_DATA_DIR}/data/api_keys:/app/db
|
2024-07-31 02:44:52 +00:00
|
|
|
- ${APP_DATA_DIR}/data/models:/home/libretranslate/.local:rw
|