From f20025531a83e1a65b6c2ef24020e388b6667a3d Mon Sep 17 00:00:00 2001 From: Siina Mashek Date: Wed, 4 Jan 2023 18:14:37 +0200 Subject: [PATCH] Now it should work, I had faulty learning --- libretranslate/.env-example | 3 +-- libretranslate/docker-compose.yml | 23 +++++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/libretranslate/.env-example b/libretranslate/.env-example index 2d15dd2..42e857f 100644 --- a/libretranslate/.env-example +++ b/libretranslate/.env-example @@ -1,5 +1,4 @@ -BASE_DATA_DIR= -LT_API_KEYS_DB_PATH=/app/db/api_keys.db +LT_API_KEYS_DB_PATH=/app/db LT_HOST=127.0.0.1 LT_PORT=5000 LT_REQ_LIMIT=10 diff --git a/libretranslate/docker-compose.yml b/libretranslate/docker-compose.yml index f2f0344..d5e4627 100644 --- a/libretranslate/docker-compose.yml +++ b/libretranslate/docker-compose.yml @@ -5,15 +5,18 @@ services: container_name: libretranslate 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} + LT_API_KEYS_DB_PATH: /app/db/api_keys.db + 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: - - /var/lib/docker/volumes/libretranslate/api_keys:/app/db/api_keys.db + - libretranslate:/app/db + - libretranslate:/home/libretranslate/.local ports: - - ${LT_HOST}:${LT_PORT}:5000 + - ${LT_HOST}:${LT_PORT}:${LT_PORT} +volumes: + libretranslate: