Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +19 -10
Dockerfile
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
3 |
RUN mkdir -p /app/backend/open_webui/static
|
4 |
RUN mkdir -p /app/backend/data
|
5 |
RUN mkdir -p /app/cache
|
@@ -9,13 +11,20 @@ RUN apt-get update && apt-get install -y apache2-utils sqlite3
|
|
9 |
|
10 |
# Update the admin password in webui.db by setting secret ORIN_PASSWORD, admin account is [email protected]
|
11 |
COPY webui.db /webui.db
|
12 |
-
|
13 |
-
|
|
|
|
|
14 |
|
15 |
-
#
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
|
20 |
-
# Run the application using uvicorn, binding to port 7860
|
21 |
-
CMD ["uvicorn", "open_webui.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
1 |
+
FROM ghcr.io/snekkenull/open-webui:latest
|
2 |
+
|
3 |
+
WORKDIR /app/backend
|
4 |
+
|
5 |
RUN mkdir -p /app/backend/open_webui/static
|
6 |
RUN mkdir -p /app/backend/data
|
7 |
RUN mkdir -p /app/cache
|
|
|
11 |
|
12 |
# Update the admin password in webui.db by setting secret ORIN_PASSWORD, admin account is [email protected]
|
13 |
COPY webui.db /webui.db
|
14 |
+
RUN --mount=type=secret,id=ORIN_PASSWORD,mode=0444,required=true \
|
15 |
+
htpasswd -bnBC 10 "" "$(cat /run/secrets/ORIN_PASSWORD)" | tr -d ':\n' > /tmp/password_hash && \
|
16 |
+
sqlite3 /webui.db "UPDATE auth SET password='$(cat /tmp/password_hash)' WHERE email='[email protected]';" && \
|
17 |
+
rm /tmp/password_hash
|
18 |
|
19 |
+
# Copy the updated webui.db to the desired location
|
20 |
+
RUN cp /webui.db /app/backend/data/webui.db
|
21 |
+
# Modify and Copy config.json to set the default lang and preset prompts.
|
22 |
+
# COPY config.json /app/backend/data/config.json
|
23 |
+
|
24 |
+
RUN chmod -R 777 /app/backend/open_webui/static
|
25 |
+
RUN chmod -R 777 /app/backend/data
|
26 |
+
RUN chmod -R 777 /app/cache
|
27 |
+
|
28 |
+
EXPOSE 7860
|
29 |
|
30 |
+
CMD ["bash", "start.sh"]
|
|
|
|