From 82c21b218f47c7f43553dfedf056322e4da39ccc Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Sun, 1 Jan 2023 10:48:52 +0200 Subject: [PATCH] Adding envvars to libretranslate --- libretranslate/.env-example | 11 +++++++++-- libretranslate/docker-compose.yml | 9 +++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/libretranslate/.env-example b/libretranslate/.env-example index 24cd4a4..2d15dd2 100644 --- a/libretranslate/.env-example +++ b/libretranslate/.env-example @@ -1,2 +1,9 @@ -LT_API_KEYS_DB_PATH= - +BASE_DATA_DIR= +LT_API_KEYS_DB_PATH=/app/db/api_keys.db +LT_HOST=127.0.0.1 +LT_PORT=5000 +LT_REQ_LIMIT=10 +LT_BATCH_LIMIT=10 +LT_FRONTEND_LANGUAGE_SOURCE=en +LT_FRONTEND_LANGUAGE_TARGET=fi +LT_API_KEYS=True diff --git a/libretranslate/docker-compose.yml b/libretranslate/docker-compose.yml index 1549ed8..fd032e7 100644 --- a/libretranslate/docker-compose.yml +++ b/libretranslate/docker-compose.yml @@ -6,7 +6,12 @@ services: restart: unless-stopped environment: - LT_API_KEYS_DB_PATH=${LT_API_KEYS_DB_PATH} + - LT_HOST=${LT_HOST} + - LT_PORT=${LT_PORT} + - LT_REQ_LIMIT=${LT_REQ_LIMIT} + - LT_BATCH_LIMIT=${LT_BATCH_LIMIT} + - LT_FRONTEND_LANGUAGE_SOURCE=${LT_FRONTEND_LANGUAGE_SOURCE} + - LT_FRONTEND_LANGUAGE_TARGET=${LT_FRONTEND_LANGUAGE_TARGET} + - LT_API_KEYS=${LT_API_KEYS} volumes: - ${BASE_DATA_DIR}/libretranslate/api_keys:/app/db/api_keys.db - ports: - - 5000:5000