-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
142 lines (104 loc) · 4.7 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
services:
##################### OPEN WEBUI #####################
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
ports:
- "3000:8080"
volumes:
- ${BACKEND_DATA_DIR}:/app/backend/data
# DOES NOT WORK YET... missing /app/backend/open_webui/static/assets/pdf-style.css
# - ${OPENWEBUI_STATIC_DIR}:/app/backend/open_webui/static
environment:
# GLOBAL_LOG_LEVEL: "DEBUG"
WEBUI_NAME: "PlebChat"
ENABLE_MESSAGE_RATING: "false"
ENABLE_COMMUNITY_SHARING: "true"
# ENABLE_SIGNUP: "false" # This will disable the creation of new user accounts - we don't want this
# ENABLE_LOGIN_FORM: "false" # too many redirects? Unsure if this is related.
DEFAULT_USER_ROLE: "user"
# DEFAULT_MODELS: ""
# STATIC_DIR: "./static_openwebui"
# /app/backend/static_openwebui
OLLAMA_BASE_URL: "http://host.docker.internal:11434"
OPENAI_API_BASE_URLS: "https://api.openai.com/v1;http://host.docker.internal:9099"
OPENAI_API_KEYS: "${OPENAI_API_KEY};${PIPELINES_API_KEY}"
# OPENAI_API_KEYS: "${OPENAI_API_KEY};whatever" # the pipeline needs the key to UPDATE pipelines, not use them - FYI
# Limit access to localhost to force traffic via Cloudflare
# TODO uncommenting the below breaks things!
# HOST: "127.0.0.1" # Uncomment to force traffic via Cloudflare and prevent local access
# I don't think we even need this because a JWT is used for authentication and a local connection will be refused.
# Trust Cloudflare headers for authentication
WEBUI_AUTH_TRUSTED_EMAIL_HEADER: "Cf-Access-Authenticated-User-Email" # Entrust the email from Cloudflare
# Optionally, use this header to set a name for new users created automatically
WEBUI_AUTH_TRUSTED_NAME_HEADER: "Cf-Access-Authenticated-User-Name"
# WEBUI_SESSION_COOKIE_SECURE: "true" # Forces cookies to be sent over secure HTTPS.
# WEBUI_SESSION_COOKIE_SAME_SITE: "lax" # Ensures that cookies are securely passed.
# ENABLE_RAG_WEB_LOADER_SSL_VERIFICATION: "true" # Make sure web certificates are validated.
# TASK_MODEL: "phi3:3.8b" # not sure that this actually works
TITLE_GENERATION_PROMPT_TEMPLATE: |
User query:
{{prompt:middletruncate:6000}}
Task:
Create a concise, 3-5 word title/summary for the user query above.
Requirements:
- The title should provide an at-a-glance idea of the generic topic / goal of the user's query
- Provide a single answer, not a list of possible answers
- Do not provide any other text
- Provide ONLY the 3-5 word title suggestion
- Your reply should be NO MORE than 5 words
Examples:
Stock Market Trends
Perfect Chocolate Chip Recipe
Evolution of Music Streaming
Remote Work Productivity Tips
Artificial Intelligence in Healthcare
Video Game Development Insights
extra_hosts:
- "host.docker.internal:host-gateway" # Allow Open WebUI to reach the host machine.
restart: always
##################### PIPELINES #####################
pipelines:
image: ghcr.io/open-webui/pipelines:main
container_name: pipelines
ports:
- "9099:9099"
environment:
add-host: host.docker.internal:host-gateway
PIPELINES_API_KEY: ${PIPELINES_API_KEY} # the pipelines will accept any API_KEY apparently... havn't gotten a reply yet
volumes:
- ${PIPELINES_DIR}:/app/pipelines # Bind mount the local directory
depends_on:
- open-webui
restart: always
################# PIPELINES BUILT FROM Dockerfile ##############
# pipelines-built:
# build:
# context: ../pipelines # Path to directory containing Dockerfile
# ports:
# - "9099:9099" # Map port 9099 from the container to your host
##################### CLOUDFLARED #####################
cloudflared:
image: cloudflare/cloudflared:latest
container_name: cloudflared_tunnel
environment:
TUNNEL_TOKEN: ${CLOUDFLARE_TUNNEL_TOKEN}
restart: always
command: tunnel run
# command: tunnel --loglevel debug run
depends_on:
- open-webui # Ensure Cloudflared waits for Open WebUI to be available before starting
##################### WATCHTOWER #####################
watchtower:
image: containrrr/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Grant Watchtower access to Docker.
environment:
- TZ=America/Los_Angeles # Set the timezone to Pacific Time (PT)
command:
- --cleanup
- --schedule
- "0 0 1 * * *" # Run once a month at midnight UTC
- open-webui
restart: always