updating prod compose example
This commit is contained in:
+10
-29
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build: .
|
image: git.fabledsword.com/bvandeusen/fabledassistant:latest
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -9,17 +9,14 @@ services:
|
|||||||
ollama:
|
ollama:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL_FILE: /run/secrets/fabled_assistant_db_url
|
DATABASE_URL: "postgresql+asyncpg://fabled:${DB_PASSWORD}@db:5432/fabledassistant"
|
||||||
SECRET_KEY_FILE: /run/secrets/fabled_assistant_secret_key
|
SECRET_KEY: "${SECRET_KEY}"
|
||||||
OLLAMA_URL: "http://ollama:11434"
|
OLLAMA_URL: "http://ollama:11434"
|
||||||
OLLAMA_MODEL: "${OLLAMA_MODEL:-llama3.1}"
|
OLLAMA_MODEL: "${OLLAMA_MODEL:-llama3.1}"
|
||||||
LOG_LEVEL: "${LOG_LEVEL:-INFO}"
|
LOG_LEVEL: "${LOG_LEVEL:-INFO}"
|
||||||
secrets:
|
|
||||||
- fabled_assistant_db_url
|
|
||||||
- fabled_assistant_secret_key
|
|
||||||
networks:
|
networks:
|
||||||
- frontend
|
- fabledassistant_frontend
|
||||||
- backend
|
- fabledassistant_backend
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/health')"]
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/api/health')"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -27,9 +24,6 @@ services:
|
|||||||
retries: 3
|
retries: 3
|
||||||
start_period: 30s
|
start_period: 30s
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 512M
|
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
max_attempts: 5
|
max_attempts: 5
|
||||||
@@ -40,21 +34,16 @@ services:
|
|||||||
- pgdata:/var/lib/postgresql/data
|
- pgdata:/var/lib/postgresql/data
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: fabled
|
POSTGRES_USER: fabled
|
||||||
POSTGRES_PASSWORD_FILE: /run/secrets/fabled_assistant_db_password
|
POSTGRES_PASSWORD: "${DB_PASSWORD}"
|
||||||
POSTGRES_DB: fabledassistant
|
POSTGRES_DB: fabledassistant
|
||||||
secrets:
|
|
||||||
- fabled_assistant_db_password
|
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- fabledassistant_backend
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U fabled"]
|
test: ["CMD-SHELL", "pg_isready -U fabled"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
memory: 256M
|
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
max_attempts: 5
|
max_attempts: 5
|
||||||
@@ -64,7 +53,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ollama_models:/root/.ollama
|
- ollama_models:/root/.ollama
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- fabledassistant_backend
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:11434/"]
|
test: ["CMD", "curl", "-f", "http://localhost:11434/"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -96,14 +85,6 @@ volumes:
|
|||||||
ollama_models:
|
ollama_models:
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
frontend:
|
fabledassistant_frontend:
|
||||||
backend:
|
fabledassistant_backend:
|
||||||
internal: true
|
internal: true
|
||||||
|
|
||||||
secrets:
|
|
||||||
fabled_assistant_secret_key:
|
|
||||||
external: true
|
|
||||||
fabled_assistant_db_password:
|
|
||||||
external: true
|
|
||||||
fabled_assistant_db_url:
|
|
||||||
external: true
|
|
||||||
|
|||||||
Reference in New Issue
Block a user