752b8230ed
Full wipe and fresh start: removed gitea_patch/unstructured_patch hacks from startup commands, upgraded all onyxdotapp images from nightly-latest-20260331 pin to :latest, removed UNSTRUCTURED_SERVER_URL (service decommissioned 2026-04-14), added Watchtower disable labels to ALL services (was missing on web_server, model_servers, db, cache, opensearch, vespa, nginx), added nginx.conf for reverse proxy. Alembic ran 349 migrations cleanly on fresh DB. All 10 containers up, 0 restarts, HTTP 200 at :3005. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
230 lines
5.7 KiB
YAML
230 lines
5.7 KiB
YAML
services:
|
|
api_server:
|
|
image: onyxdotapp/onyx-backend:latest
|
|
command: >
|
|
/bin/sh -c "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
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- onyx_file_connector:/home/file_connector_storage
|
|
networks:
|
|
- onyx
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
background:
|
|
image: onyxdotapp/onyx-backend:latest
|
|
command: >
|
|
/bin/sh -c "/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
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- onyx_file_connector:/home/file_connector_storage
|
|
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
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
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
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
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
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
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
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
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
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
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
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
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
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
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
|
|
labels:
|
|
com.centurylinklabs.watchtower.enable: "false"
|
|
|
|
volumes:
|
|
onyx_file_connector:
|
|
onyx_model_cache_huggingface:
|
|
onyx_db:
|
|
onyx_vespa:
|
|
onyx_opensearch:
|
|
|
|
networks:
|
|
onyx:
|
|
driver: bridge
|