Upload 3 files
Browse files- Dockerfile +16 -6
- nginx.conf +46 -0
- setup_endpoints.sh +1 -1
Dockerfile
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
FROM ghcr.io/open-webui/open-webui:main
|
| 2 |
|
| 3 |
-
|
|
|
|
| 4 |
ENV HOST=0.0.0.0
|
| 5 |
ENV OPENWEBUI_DATA_DIR=/data
|
| 6 |
|
|
@@ -14,6 +15,9 @@ ENV ANONYMIZED_TELEMETRY=false
|
|
| 14 |
ENV SCARF_NO_ANALYTICS=true
|
| 15 |
ENV DO_NOT_TRACK=true
|
| 16 |
|
|
|
|
|
|
|
|
|
|
| 17 |
# Python skripte
|
| 18 |
COPY setup_endpoints.sh /app/setup_endpoints.sh
|
| 19 |
COPY backup_restore.sh /app/backup_restore.sh
|
|
@@ -33,17 +37,23 @@ COPY auto_disable_native_tools.json /app/auto_disable_native_tools.json
|
|
| 33 |
COPY auto_memory.json /app/auto_memory.json
|
| 34 |
COPY global_system_prompt_filter.json /app/global_system_prompt_filter.json
|
| 35 |
COPY __easysearch_v0_4_3__high-performance_web_search_filter.json /app/__easysearch_v0_4_3__high-performance_web_search_filter.json
|
| 36 |
-
COPY __mermaid_doctor_-_heals_broken_mermaid_diagrams_generated_by_small_or_hallucinating_models.json /app/__mermaid_doctor_-
|
| 37 |
COPY github_simple.json /app/github_simple.json
|
| 38 |
COPY pdf_tools_-_rich_ui_for_in_context_basic_editing_.json /app/pdf_tools_-_rich_ui_for_in_context_basic_editing_.json
|
| 39 |
|
| 40 |
-
#
|
| 41 |
-
|
|
|
|
| 42 |
COPY preset_creator.html /app/tools/preset_creator.html
|
| 43 |
|
| 44 |
RUN chmod +x /app/setup_endpoints.sh /app/backup_restore.sh
|
| 45 |
|
| 46 |
EXPOSE 8080
|
| 47 |
-
EXPOSE 8081
|
| 48 |
|
| 49 |
-
CMD bash -lc "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM ghcr.io/open-webui/open-webui:main
|
| 2 |
|
| 3 |
+
# WebUI sada sluša na 7860 (interno), nginx preuzima 8080
|
| 4 |
+
ENV PORT=7860
|
| 5 |
ENV HOST=0.0.0.0
|
| 6 |
ENV OPENWEBUI_DATA_DIR=/data
|
| 7 |
|
|
|
|
| 15 |
ENV SCARF_NO_ANALYTICS=true
|
| 16 |
ENV DO_NOT_TRACK=true
|
| 17 |
|
| 18 |
+
# Instaliraj nginx
|
| 19 |
+
RUN apt-get update -qq && apt-get install -y -qq nginx && rm -rf /var/lib/apt/lists/*
|
| 20 |
+
|
| 21 |
# Python skripte
|
| 22 |
COPY setup_endpoints.sh /app/setup_endpoints.sh
|
| 23 |
COPY backup_restore.sh /app/backup_restore.sh
|
|
|
|
| 37 |
COPY auto_memory.json /app/auto_memory.json
|
| 38 |
COPY global_system_prompt_filter.json /app/global_system_prompt_filter.json
|
| 39 |
COPY __easysearch_v0_4_3__high-performance_web_search_filter.json /app/__easysearch_v0_4_3__high-performance_web_search_filter.json
|
| 40 |
+
COPY __mermaid_doctor_-_heals_broken_mermaid_diagrams_generated_by_small_or_hallucinating_models.json /app/__mermaid_doctor_-_heals_broken_mermaid_diagrams_extended.json
|
| 41 |
COPY github_simple.json /app/github_simple.json
|
| 42 |
COPY pdf_tools_-_rich_ui_for_in_context_basic_editing_.json /app/pdf_tools_-_rich_ui_for_in_context_basic_editing_.json
|
| 43 |
|
| 44 |
+
# nginx config i tools HTML
|
| 45 |
+
COPY nginx.conf /etc/nginx/nginx.conf
|
| 46 |
+
RUN mkdir -p /app/tools /tmp/nginx_client /tmp/nginx_proxy /tmp/nginx_fastcgi /tmp/nginx_uwsgi /tmp/nginx_scgi
|
| 47 |
COPY preset_creator.html /app/tools/preset_creator.html
|
| 48 |
|
| 49 |
RUN chmod +x /app/setup_endpoints.sh /app/backup_restore.sh
|
| 50 |
|
| 51 |
EXPOSE 8080
|
|
|
|
| 52 |
|
| 53 |
+
CMD bash -lc "\
|
| 54 |
+
bash /app/backup_restore.sh restore; \
|
| 55 |
+
bash /app/backup_restore.sh loop & \
|
| 56 |
+
python3 /app/tool_server.py & \
|
| 57 |
+
nginx -g 'daemon off;' & \
|
| 58 |
+
sleep 10 && bash /app/setup_endpoints.sh & \
|
| 59 |
+
bash start.sh"
|
nginx.conf
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
worker_processes 1;
|
| 2 |
+
error_log /dev/stderr warn;
|
| 3 |
+
pid /tmp/nginx.pid;
|
| 4 |
+
|
| 5 |
+
events {
|
| 6 |
+
worker_connections 1024;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
+
http {
|
| 10 |
+
access_log off;
|
| 11 |
+
|
| 12 |
+
# Temp dirs u /tmp jer nemamo root write pristup
|
| 13 |
+
client_body_temp_path /tmp/nginx_client;
|
| 14 |
+
proxy_temp_path /tmp/nginx_proxy;
|
| 15 |
+
fastcgi_temp_path /tmp/nginx_fastcgi;
|
| 16 |
+
uwsgi_temp_path /tmp/nginx_uwsgi;
|
| 17 |
+
scgi_temp_path /tmp/nginx_scgi;
|
| 18 |
+
|
| 19 |
+
server {
|
| 20 |
+
listen 8080;
|
| 21 |
+
server_name _;
|
| 22 |
+
|
| 23 |
+
# Preset Creator tool
|
| 24 |
+
location /preset-creator {
|
| 25 |
+
proxy_pass http://127.0.0.1:8081/preset-creator;
|
| 26 |
+
proxy_set_header Host $host;
|
| 27 |
+
proxy_set_header X-Real-IP $remote_addr;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
# Sve ostalo → Open WebUI (internal port 7860)
|
| 31 |
+
location / {
|
| 32 |
+
proxy_pass http://127.0.0.1:7860;
|
| 33 |
+
proxy_http_version 1.1;
|
| 34 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 35 |
+
proxy_set_header Connection "upgrade";
|
| 36 |
+
proxy_set_header Host $host;
|
| 37 |
+
proxy_set_header X-Real-IP $remote_addr;
|
| 38 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 39 |
+
proxy_set_header X-Forwarded-Proto $scheme;
|
| 40 |
+
proxy_read_timeout 300s;
|
| 41 |
+
proxy_send_timeout 300s;
|
| 42 |
+
proxy_buffering off;
|
| 43 |
+
client_max_body_size 100M;
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
}
|
setup_endpoints.sh
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
# setup_endpoints.sh — Pametna konfiguracija API provajdera
|
| 3 |
|
| 4 |
-
BASE_URL="http://localhost:
|
| 5 |
ADMIN_EMAIL="${WEBUI_ADMIN_EMAIL:-}"
|
| 6 |
ADMIN_PASSWORD="${WEBUI_ADMIN_PASSWORD:-}"
|
| 7 |
ADMIN_NAME="${WEBUI_ADMIN_NAME:-admin}"
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
# setup_endpoints.sh — Pametna konfiguracija API provajdera
|
| 3 |
|
| 4 |
+
BASE_URL="http://localhost:7860"
|
| 5 |
ADMIN_EMAIL="${WEBUI_ADMIN_EMAIL:-}"
|
| 6 |
ADMIN_PASSWORD="${WEBUI_ADMIN_PASSWORD:-}"
|
| 7 |
ADMIN_NAME="${WEBUI_ADMIN_NAME:-admin}"
|