diff --git a/docker-compose.yaml b/docker-compose.yaml index b619bdc..53a0888 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -63,6 +63,9 @@ services: ENABLE_REALTIME_CHAT_SAVE: False ENV: dev + #Database + DATABASE_URL: postgresql+psycopg2://openwebui_user:${PG_PASS}@openwebui_postgres_db:5432/openwebui_db + # Ollama OLLAMA_BASE_URL: http://ollama1:11434 OLLAMA_BASE_URLS: http://ollama1:11434,http://ollama2:11434 @@ -144,13 +147,26 @@ services: networks: - shared_net + openwebui_postgres_db: # Renamed service key (lowercase) + image: postgres:latest + container_name: openwebui_postgres_db # Keep container name consistent + restart: always + environment: + POSTGRES_DB: openwebui_db + POSTGRES_USER: openwebui_user + POSTGRES_PASSWORD: ${PG_PASS} + volumes: + - postgres_data:/var/lib/postgresql/data + networks: + - shared_net volumes: ollama: ollama-small: data: chromadb: - redis_data: + redis_data: + postgres_data: networks: shared_net: \ No newline at end of file