drfy commited on
Commit
c023799
·
1 Parent(s): d144906

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +36 -17
Dockerfile CHANGED
@@ -1,18 +1,26 @@
 
 
1
  FROM ghcr.io/open-webui/open-webui:main
2
- WORKDIR /app/backend
3
- RUN mkdir -p /app/backend/open_webui/static
4
- RUN mkdir -p /app/backend/static
5
- RUN mkdir -p /app/backend/data
6
- RUN mkdir -p /app/cache
7
- RUN mkdir -p /tmp
8
- RUN apt-get update && apt-get install -y apache2-utils
9
- RUN chmod -R 777 /app/backend/open_webui/static
10
- RUN chmod -R 777 /app/backend/static
11
- RUN chmod -R 777 /app/backend/data
12
- RUN chmod -R 777 /app/cache
13
- RUN chmod -R 777 /tmp
14
- ENV PGSSLCERT=/tmp/postgresql.crt
15
- ENV TRANSFORMERS_CACHE=/app/cache
 
 
 
 
 
 
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
- CMD ["bash", "start.sh"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.