Update Dockerfile
Browse files- Dockerfile +36 -17
Dockerfile
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
|
|
|
|
|
| 1 |
FROM ghcr.io/open-webui/open-webui:main
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
ENV SCARF_NO_ANALYTICS=true
|
| 17 |
ENV DO_NOT_TRACK=true
|
| 18 |
ENV ENABLE_SIGNUP=false
|
|
@@ -21,7 +29,18 @@ ENV DEFAULT_MODELS=flash
|
|
| 21 |
ENV WEBUI_NAME=Drfy
|
| 22 |
ENV ENABLE_IMAGE_GENERATION=True
|
| 23 |
ENV ENABLE_COMMUNITY_SHARING=false
|
| 24 |
-
ENV TZ Asia/Shanghai
|
| 25 |
-
EXPOSE 7860
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Open WebUI Docker image
|
| 2 |
+
# This image already contains the application and necessary dependencies.
|
| 3 |
FROM ghcr.io/open-webui/open-webui:main
|
| 4 |
+
|
| 5 |
+
# Set necessary environment variables
|
| 6 |
+
# Note: Sensitive variables like API keys, database passwords,
|
| 7 |
+
# WEBUI_AUTH_SECRET, WEBUI_SECRET_KEY should be set as
|
| 8 |
+
# Hugging Face Space Secret Variables, NOT here directly.
|
| 9 |
+
|
| 10 |
+
# Set timezone
|
| 11 |
+
ENV TZ Asia/Shanghai
|
| 12 |
+
|
| 13 |
+
# Configure cache directory to a non-persistent location or remove if not needed
|
| 14 |
+
# Or better, rely on default if base image handles it well.
|
| 15 |
+
# Removing manual cache dir creation and chmod.
|
| 16 |
+
|
| 17 |
+
# Configure data directory to use Hugging Face persistent storage
|
| 18 |
+
# This is crucial for persistence of database, file uploads, etc.
|
| 19 |
+
ENV DATA_FOLDER=/data
|
| 20 |
+
|
| 21 |
+
# Example of other non-sensitive Open WebUI environment variables
|
| 22 |
+
# These can be set here or in your Space Settings -> Environment Variables
|
| 23 |
+
# Space Settings variables will override these if set in both places.
|
| 24 |
ENV SCARF_NO_ANALYTICS=true
|
| 25 |
ENV DO_NOT_TRACK=true
|
| 26 |
ENV ENABLE_SIGNUP=false
|
|
|
|
| 29 |
ENV WEBUI_NAME=Drfy
|
| 30 |
ENV ENABLE_IMAGE_GENERATION=True
|
| 31 |
ENV ENABLE_COMMUNITY_SHARING=false
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
# If you need to set a custom base URL for OpenAI or RAG (e.g., for proxy)
|
| 34 |
+
# ENV OPENAI_API_BASE_URL=https://api.openai.com/v1
|
| 35 |
+
# ENV RAG_OPENAI_API_BASE_URL=https://api.openai.com/v1
|
| 36 |
+
|
| 37 |
+
# If you are using RAG with OpenAI/compatible embedding engine
|
| 38 |
+
# ENV RAG_EMBEDDING_ENGINE=openai
|
| 39 |
+
# ENV RAG_EMBEDDING_MODEL=text-embedding-3-large
|
| 40 |
+
|
| 41 |
+
# Open WebUI default port is 8080
|
| 42 |
+
EXPOSE 8080 # Document the port, ensure app_port in README.md matches this
|
| 43 |
+
|
| 44 |
+
# The official image has a default ENTRYPOINT/CMD to start the application.
|
| 45 |
+
# Do NOT override CMD unless you have a very specific reason and know the base image's startup process.
|
| 46 |
+
# CMD is removed to use the base image's default start command.
|