在这里,端口10801,你可以自己改一下
version: "3.7"
services:
open-webui:
container_name: open-webui
image: ghcr.io/open-webui/open-webui:main
restart: always
networks:
- open-webui
ports:
- "10801:8080"
volumes:
- ./open-webui_data:/app/backend/data
environment:
- OLLAMA_BASE_URL=false
- SEARXNG_URL=false
- ENABLE_REALTIME_CHAT_SAVE=false
- DATABASE_URL=postgres://openwebui:mypasswd@postgres:5432/openwebui
- DATABASE_POOL_SIZE=10
- DATABASE_POOL_MAX_OVERFLOW=20
- ENABLE_OLLAMA_API=false
depends_on:
- postgres
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
postgres:
container_name: postgres
image: postgres:latest
restart: always
networks:
- open-webui
environment:
POSTGRES_USER: openwebui
POSTGRES_PASSWORD: mypasswd
POSTGRES_DB: openwebui
volumes:
- ./postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
open-webui:
driver: bridge
ipam:
config:
- subnet: 192.168.5.0/24