#version: "3.9" services: libretranslate: container_name: LibreTranslate image: libretranslate/libretranslate healthcheck: test: ['CMD-SHELL', './venv/bin/python scripts/healthcheck.py'] mem_limit: 4g security_opt: - no-new-privileges:true ports: - 7821:5000 environment: #LT_LOAD_ONLY: de,en,zh,it,es,fr,pl,tr,ru,fi,nl,id,cs,el,hu,sk LT_API_KEYS: true # Enables API key authentication for the LibreTranslate service. LT_API_KEYS_DB_PATH: /app/db/api_keys.db # Specifies the path within the container where API keys are stored. LT_UPDATE_MODELS: true # Allows the LibreTranslate service to update its translation models on startup. LT_LOAD_ONLY: en,fr,es,de,it,pt,ru,ja,zh # Restricts the languages loaded by LibreTranslate to these language codes. volumes: - ./libretranslate_api_keys:/app/db # Mounts a volume at /app/db within the container for persistent API key storage. - ./libretranslate_models:/home/libretranslate/.local:rw # Mounts a volume for storing and updating translation models. tty: true restart: on-failure:5