Add persistent multi-user sessions and Docker deployment
This commit is contained in:
parent
51a6e845d1
commit
104577c826
24 changed files with 2094 additions and 468 deletions
41
compose.yml
Normal file
41
compose.yml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
services:
|
||||
translator:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: llm-translator:local
|
||||
init: true
|
||||
restart: unless-stopped
|
||||
stop_grace_period: 3m10s
|
||||
ports:
|
||||
- "${APP_PORT:-8000}:8000"
|
||||
environment:
|
||||
DATABASE_PATH: /app/data/translator.db
|
||||
JWT_SECRET_FILE: /app/data/.jwt-secret
|
||||
JWT_SECRET_KEY: "${JWT_SECRET_KEY:-}"
|
||||
JWT_EXPIRE_HOURS: "${JWT_EXPIRE_HOURS:-24}"
|
||||
LLMS_CONFIG_PATH: /app/config/llms.json
|
||||
USERS_CONFIG_PATH: /app/config/users.json
|
||||
LLM_TIMEOUT_SECONDS: "${LLM_TIMEOUT_SECONDS:-180}"
|
||||
TRANSLATION_CHUNK_CHARS: "${TRANSLATION_CHUNK_CHARS:-1500}"
|
||||
BOOTSTRAP_ADMIN_ID: "${BOOTSTRAP_ADMIN_ID:-}"
|
||||
BOOTSTRAP_ADMIN_PASSWORD: "${BOOTSTRAP_ADMIN_PASSWORD:-}"
|
||||
volumes:
|
||||
- translator-data:/app/data
|
||||
- type: bind
|
||||
source: ./config/llms.json
|
||||
target: /app/config/llms.json
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: ./config/users.docker.json
|
||||
target: /app/config/users.json
|
||||
read_only: true
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/api/health/ready', timeout=4).close()"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
start_period: 20s
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
translator-data:
|
||||
Loading…
Add table
Add a link
Reference in a new issue