From 310678b2797ee508383f7e8eec348197b2db1362 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 11 Feb 2026 21:47:44 -0500 Subject: [PATCH] updating prod compose example --- docker-compose.prod.yml | 39 ++++++++++----------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index a889e12..a0ac505 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,6 +1,6 @@ services: app: - build: . + image: git.fabledsword.com/bvandeusen/fabledassistant:latest ports: - "5000:5000" depends_on: @@ -9,17 +9,14 @@ services: ollama: condition: service_started environment: - DATABASE_URL_FILE: /run/secrets/fabled_assistant_db_url - SECRET_KEY_FILE: /run/secrets/fabled_assistant_secret_key + DATABASE_URL: "postgresql+asyncpg://fabled:${DB_PASSWORD}@db:5432/fabledassistant" + SECRET_KEY: "${SECRET_KEY}" OLLAMA_URL: "http://ollama:11434" OLLAMA_MODEL: "${OLLAMA_MODEL:-llama3.1}" LOG_LEVEL: "${LOG_LEVEL:-INFO}" - secrets: - - fabled_assistant_db_url - - fabled_assistant_secret_key networks: - - frontend - - backend + - fabledassistant_frontend + - fabledassistant_backend healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/health')"] interval: 30s @@ -27,9 +24,6 @@ services: retries: 3 start_period: 30s deploy: - resources: - limits: - memory: 512M restart_policy: condition: on-failure max_attempts: 5 @@ -40,21 +34,16 @@ services: - pgdata:/var/lib/postgresql/data environment: POSTGRES_USER: fabled - POSTGRES_PASSWORD_FILE: /run/secrets/fabled_assistant_db_password + POSTGRES_PASSWORD: "${DB_PASSWORD}" POSTGRES_DB: fabledassistant - secrets: - - fabled_assistant_db_password networks: - - backend + - fabledassistant_backend healthcheck: test: ["CMD-SHELL", "pg_isready -U fabled"] interval: 10s timeout: 5s retries: 5 deploy: - resources: - limits: - memory: 256M restart_policy: condition: on-failure max_attempts: 5 @@ -64,7 +53,7 @@ services: volumes: - ollama_models:/root/.ollama networks: - - backend + - fabledassistant_backend healthcheck: test: ["CMD", "curl", "-f", "http://localhost:11434/"] interval: 30s @@ -96,14 +85,6 @@ volumes: ollama_models: networks: - frontend: - backend: + fabledassistant_frontend: + fabledassistant_backend: internal: true - -secrets: - fabled_assistant_secret_key: - external: true - fabled_assistant_db_password: - external: true - fabled_assistant_db_url: - external: true