Create Dockerfile
Browse files- Dockerfile +19 -0
Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ghcr.io/open-webui/open-webui:main
|
| 2 |
+
|
| 3 |
+
# Set the port to 7860 for Hugging Face Spaces
|
| 4 |
+
ENV PORT=8080
|
| 5 |
+
EXPOSE 8080
|
| 6 |
+
|
| 7 |
+
# Configure WebUI settings
|
| 8 |
+
ENV OLLAMA_API_BASE_URL=http://host.docker.internal:11434
|
| 9 |
+
ENV WEBUI_SECRET_KEY=random-secret-key-1234
|
| 10 |
+
|
| 11 |
+
# Persist data volume
|
| 12 |
+
VOLUME /app/backend/data
|
| 13 |
+
|
| 14 |
+
# Health check
|
| 15 |
+
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
|
| 16 |
+
CMD curl -f http://localhost:8080/api/health || exit 1
|
| 17 |
+
|
| 18 |
+
# Start command
|
| 19 |
+
CMD ["sh", "-c", "python -m uvicorn main:app --host 0.0.0.0 --port ${PORT}"]
|