feat: sync full-stack Docker runtime and UI
This commit is contained in:
+62
-9
@@ -5,25 +5,48 @@ services:
|
||||
dockerfile: Dockerfile.frontend
|
||||
args:
|
||||
DOCKER_REGISTRY_PREFIX: ${DOCKER_REGISTRY_PREFIX:-}
|
||||
cache_from:
|
||||
- type=local,src=./docker-data/build-cache/frontend
|
||||
cache_to:
|
||||
- type=local,dest=./docker-data/build-cache/frontend,mode=max
|
||||
depends_on:
|
||||
- api
|
||||
api:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/ || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
|
||||
postgres:
|
||||
image: ${DOCKER_REGISTRY_PREFIX:-}postgres:16-alpine
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-llm_in_text}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-llm_in_text}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-llm_in_text_change_me}
|
||||
volumes:
|
||||
- ./docker-data/postgres:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-llm_in_text} -d ${POSTGRES_DB:-llm_in_text}"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
image: ${DOCKER_REGISTRY_PREFIX:-}redis:7-alpine
|
||||
restart: unless-stopped
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
volumes:
|
||||
- ./docker-data/redis:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
searxng:
|
||||
image: ${DOCKER_REGISTRY_PREFIX:-}searxng/searxng:latest
|
||||
@@ -86,6 +109,10 @@ services:
|
||||
dockerfile: backend/Dockerfile
|
||||
args:
|
||||
DOCKER_REGISTRY_PREFIX: ${DOCKER_REGISTRY_PREFIX:-}
|
||||
cache_from:
|
||||
- type=local,src=./docker-data/build-cache/api
|
||||
cache_to:
|
||||
- type=local,dest=./docker-data/build-cache/api,mode=max
|
||||
env_file:
|
||||
- backend/.env
|
||||
environment:
|
||||
@@ -96,15 +123,29 @@ services:
|
||||
JOB_SHARED_TEMP_DIR: /shared-jobs
|
||||
SEARXNG_BASE_URL: http://searxng:8080
|
||||
FIRECRAWL_BASE_URL: http://firecrawl:3002
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
- searxng
|
||||
- firecrawl
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
searxng:
|
||||
condition: service_started
|
||||
firecrawl:
|
||||
condition: service_started
|
||||
ports:
|
||||
- "8001:8001"
|
||||
volumes:
|
||||
- ./docker-data/jobs:/shared-jobs
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8001/v1/tts-asr/status', timeout=5)"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 20s
|
||||
|
||||
worker:
|
||||
build:
|
||||
@@ -112,6 +153,10 @@ services:
|
||||
dockerfile: backend/Dockerfile
|
||||
args:
|
||||
DOCKER_REGISTRY_PREFIX: ${DOCKER_REGISTRY_PREFIX:-}
|
||||
cache_from:
|
||||
- type=local,src=./docker-data/build-cache/worker
|
||||
cache_to:
|
||||
- type=local,dest=./docker-data/build-cache/worker,mode=max
|
||||
command: ["python", "worker.py"]
|
||||
env_file:
|
||||
- backend/.env
|
||||
@@ -123,10 +168,18 @@ services:
|
||||
JOB_SHARED_TEMP_DIR: /shared-jobs
|
||||
SEARXNG_BASE_URL: http://searxng:8080
|
||||
FIRECRAWL_BASE_URL: http://firecrawl:3002
|
||||
restart: unless-stopped
|
||||
init: true
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
- searxng
|
||||
- firecrawl
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
searxng:
|
||||
condition: service_started
|
||||
firecrawl:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- ./docker-data/jobs:/shared-jobs
|
||||
|
||||
Reference in New Issue
Block a user