Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -14
Dockerfile
CHANGED
@@ -1,26 +1,23 @@
|
|
1 |
FROM ghcr.io/open-webui/open-webui:main
|
2 |
|
3 |
-
# Set
|
4 |
ENV OPENAI_API_BASE_URLS="https://api.together.xyz/v1;https://api.groq.com/openai/v1"
|
5 |
|
6 |
# Mount secrets and read their values in a RUN command
|
7 |
RUN --mount=type=secret,id=TOGETHER_API_KEY,mode=0444,required=true \
|
8 |
--mount=type=secret,id=GROQ_API_KEY,mode=0444,required=true \
|
9 |
--mount=type=secret,id=REMOTE_DB_URI,mode=0444,required=true \
|
10 |
-
|
11 |
-
|
12 |
-
REMOTE_DB_URI=$(cat /run/secrets/REMOTE_DB_URI) && \
|
13 |
-
echo "TOGETHER_API_KEY=${TOGETHER_API_KEY}" >> /build_secrets && \
|
14 |
-
echo "GROQ_API_KEY=${GROQ_API_KEY}" >> /build_secrets && \
|
15 |
-
echo "REMOTE_DB_URI=${REMOTE_DB_URI}" >> /build_secrets
|
16 |
|
17 |
-
#
|
18 |
-
|
19 |
-
source /build_secrets
|
20 |
|
21 |
-
#
|
22 |
-
|
23 |
-
ENV DATABASE_URL="${REMOTE_DB_URI}"
|
24 |
|
25 |
-
#
|
|
|
|
|
|
|
26 |
EXPOSE 8080
|
|
|
1 |
FROM ghcr.io/open-webui/open-webui:main
|
2 |
|
3 |
+
# Set static environment variables
|
4 |
ENV OPENAI_API_BASE_URLS="https://api.together.xyz/v1;https://api.groq.com/openai/v1"
|
5 |
|
6 |
# Mount secrets and read their values in a RUN command
|
7 |
RUN --mount=type=secret,id=TOGETHER_API_KEY,mode=0444,required=true \
|
8 |
--mount=type=secret,id=GROQ_API_KEY,mode=0444,required=true \
|
9 |
--mount=type=secret,id=REMOTE_DB_URI,mode=0444,required=true \
|
10 |
+
mkdir -p /run/secrets && \
|
11 |
+
cp /run/secrets/TOGETHER_API_KEY /run/secrets/GROQ_API_KEY /run/secrets/REMOTE_DB_URI /tmp/secrets/
|
|
|
|
|
|
|
|
|
12 |
|
13 |
+
# Copy the entrypoint script
|
14 |
+
COPY entrypoint.sh /usr/local/bin/
|
|
|
15 |
|
16 |
+
# Make the entrypoint script executable
|
17 |
+
RUN chmod +x /usr/local/bin/entrypoint.sh
|
|
|
18 |
|
19 |
+
# Set the entrypoint
|
20 |
+
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
21 |
+
|
22 |
+
# Expose the necessary port
|
23 |
EXPOSE 8080
|