04a18efc6a
DB alembic HEAD is 1d78c0ca7853 (remove_voice_provider_deleted_column). 20260331 is the exact build where that revision is HEAD — alembic runs clean with no migrations applied. Later builds (20260412/latest) introduce migrations d8cdfee5df80–503883791c39 that break api_server startup. Watchtower disabled on api_server and background to prevent future auto-upgrades from breaking alembic compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
222 lines
5.7 KiB
YAML
222 lines
5.7 KiB
YAML
services:
|
|
api_server:
|
|
image: onyxdotapp/onyx-backend:nightly-latest-20260331
|
|
command: >
|
|
/bin/sh -c "python3 /mnt/gitea_patch/gitea_patch.py &&
|
|
python3 /mnt/gitea_patch/unstructured_patch.py &&
|
|
alembic upgrade head &&
|
|
echo Starting Onyx API Server &&
|
|
uvicorn onyx.main:app --host 0.0.0.0 --port 8080"
|
|
depends_on:
|
|
relational_db:
|
|
condition: service_healthy
|
|
index:
|
|
condition: service_healthy
|
|
cache:
|
|
condition: service_healthy
|
|
restart: "no"
|
|
mem_limit: 2G
|
|
memswap_limit: 2G
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- AUTH_TYPE=basic
|
|
- POSTGRES_HOST=relational_db
|
|
- VESPA_HOST=index
|
|
- REDIS_HOST=cache
|
|
- MODEL_SERVER_HOST=inference_model_server
|
|
- INDEXING_MODEL_SERVER_HOST=indexing_model_server
|
|
- OPENSEARCH_HOST=opensearch
|
|
- ENABLE_OPENSEARCH_INDEXING_FOR_ONYX=false
|
|
- FILE_STORE_BACKEND=postgres
|
|
- UNSTRUCTURED_SERVER_URL=http://192.168.86.100:8000
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- onyx_file_connector:/home/file_connector_storage
|
|
- /mnt/docker-data/compose/bart/onyx:/mnt/gitea_patch:ro
|
|
networks:
|
|
- onyx
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
background:
|
|
image: onyxdotapp/onyx-backend:nightly-latest-20260331
|
|
command: >
|
|
/bin/sh -c "python3 /mnt/gitea_patch/gitea_patch.py &&
|
|
python3 /mnt/gitea_patch/unstructured_patch.py &&
|
|
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf"
|
|
depends_on:
|
|
relational_db:
|
|
condition: service_healthy
|
|
index:
|
|
condition: service_healthy
|
|
cache:
|
|
condition: service_healthy
|
|
restart: "no"
|
|
mem_limit: 3G
|
|
memswap_limit: 3G
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- AUTH_TYPE=basic
|
|
- POSTGRES_HOST=relational_db
|
|
- VESPA_HOST=index
|
|
- REDIS_HOST=cache
|
|
- MODEL_SERVER_HOST=inference_model_server
|
|
- INDEXING_MODEL_SERVER_HOST=indexing_model_server
|
|
- OPENSEARCH_HOST=opensearch
|
|
- ENABLE_OPENSEARCH_INDEXING_FOR_ONYX=false
|
|
- FILE_STORE_BACKEND=postgres
|
|
- UNSTRUCTURED_SERVER_URL=http://192.168.86.100:8000
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- onyx_file_connector:/home/file_connector_storage
|
|
- /mnt/docker-data/compose/bart/onyx:/mnt/gitea_patch:ro
|
|
networks:
|
|
- onyx
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
web_server:
|
|
image: onyxdotapp/onyx-web-server:latest
|
|
depends_on:
|
|
- api_server
|
|
restart: "no"
|
|
mem_limit: 512M
|
|
memswap_limit: 512M
|
|
environment:
|
|
- INTERNAL_URL=http://api_server:8080
|
|
- WEB_DOMAIN=https://onyx.hobbs.farm
|
|
- NEXT_PUBLIC_DISABLE_STREAMING=false
|
|
- AUTH_TYPE=basic
|
|
networks:
|
|
- onyx
|
|
|
|
inference_model_server:
|
|
image: onyxdotapp/onyx-model-server:latest
|
|
command: >
|
|
/bin/sh -c "exec uvicorn model_server.main:app --host 0.0.0.0 --port 9000"
|
|
restart: "no"
|
|
mem_limit: 2G
|
|
memswap_limit: 2G
|
|
environment:
|
|
- MIN_THREADS_ML_MODELS=1
|
|
- LOG_LEVEL=info
|
|
volumes:
|
|
- onyx_model_cache_huggingface:/root/.cache/huggingface/
|
|
networks:
|
|
- onyx
|
|
|
|
indexing_model_server:
|
|
image: onyxdotapp/onyx-model-server:latest
|
|
command: >
|
|
/bin/sh -c "exec uvicorn model_server.main:app --host 0.0.0.0 --port 9000"
|
|
restart: "no"
|
|
mem_limit: 2G
|
|
memswap_limit: 2G
|
|
environment:
|
|
- MIN_THREADS_ML_MODELS=1
|
|
- INDEXING_ONLY=true
|
|
- LOG_LEVEL=info
|
|
volumes:
|
|
- onyx_model_cache_huggingface:/root/.cache/huggingface/
|
|
networks:
|
|
- onyx
|
|
|
|
relational_db:
|
|
image: postgres:15.2-alpine
|
|
restart: "no"
|
|
mem_limit: 512M
|
|
memswap_limit: 512M
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=onyx_postgres_pw
|
|
volumes:
|
|
- onyx_db:/var/lib/postgresql/data
|
|
networks:
|
|
- onyx
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
index:
|
|
image: vespaengine/vespa:8.609.39
|
|
restart: "no"
|
|
mem_limit: 4G
|
|
memswap_limit: 4G
|
|
volumes:
|
|
- onyx_vespa:/opt/vespa/var
|
|
networks:
|
|
- onyx
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -sf http://localhost:19071/state/v1/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 10
|
|
start_period: 120s
|
|
|
|
opensearch:
|
|
image: opensearchproject/opensearch:2.11.1
|
|
restart: "no"
|
|
mem_limit: 2G
|
|
memswap_limit: 2G
|
|
environment:
|
|
- discovery.type=single-node
|
|
- plugins.security.disabled=true
|
|
- OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g
|
|
- DISABLE_INSTALL_DEMO_CONFIG=true
|
|
volumes:
|
|
- onyx_opensearch:/usr/share/opensearch/data
|
|
networks:
|
|
- onyx
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 10
|
|
start_period: 120s
|
|
|
|
cache:
|
|
image: redis:7.4-alpine
|
|
restart: "no"
|
|
mem_limit: 256M
|
|
memswap_limit: 256M
|
|
command: redis-server --maxmemory 128mb --maxmemory-policy allkeys-lru
|
|
networks:
|
|
- onyx
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
nginx:
|
|
image: nginx:1.25.5-alpine
|
|
restart: "no"
|
|
mem_limit: 128M
|
|
memswap_limit: 128M
|
|
depends_on:
|
|
- api_server
|
|
- web_server
|
|
ports:
|
|
- "3005:80"
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
networks:
|
|
- onyx
|
|
|
|
volumes:
|
|
onyx_file_connector:
|
|
onyx_model_cache_huggingface:
|
|
onyx_db:
|
|
onyx_vespa:
|
|
onyx_opensearch:
|
|
|
|
networks:
|
|
onyx:
|
|
driver: bridge
|