FROM ghcr.io/open-webui/open-webui:main # WebUI sada sluĊĦa na 7860 (interno), nginx preuzima 8080 ENV PORT=7860 ENV HOST=0.0.0.0 ENV OPENWEBUI_DATA_DIR=/data # Auth ENV WEBUI_AUTH=true ENV ENABLE_SIGNUP=false ENV DEFAULT_USER_ROLE=user # Analytics opt-out ENV ANONYMIZED_TELEMETRY=false ENV SCARF_NO_ANALYTICS=true ENV DO_NOT_TRACK=true # Instaliraj nginx RUN apt-get update -qq && apt-get install -y -qq nginx && rm -rf /var/lib/apt/lists/* # Python skripte COPY setup_endpoints.sh /app/setup_endpoints.sh COPY backup_restore.sh /app/backup_restore.sh COPY install_functions.py /app/install_functions.py COPY context_detector.py /app/context_detector.py COPY token_compressor.py /app/token_compressor.py COPY coding_priority_pipe.py /app/coding_priority_pipe.py COPY smart_matcher.py /app/smart_matcher.py COPY api_router.py /app/api_router.py COPY system_prompt.txt /app/system_prompt.txt COPY tool_server.py /app/tool_server.py # JSON funkcije COPY token_saver.json /app/token_saver.json COPY context_clip_filter.json /app/context_clip_filter.json COPY auto_disable_native_tools.json /app/auto_disable_native_tools.json COPY auto_memory.json /app/auto_memory.json COPY global_system_prompt_filter.json /app/global_system_prompt_filter.json COPY __easysearch_v0_4_3__high-performance_web_search_filter.json /app/__easysearch_v0_4_3__high-performance_web_search_filter.json COPY __mermaid_doctor_-_heals_broken_mermaid_diagrams_generated_by_small_or_hallucinating_models.json /app/__mermaid_doctor_-_heals_broken_mermaid_diagrams_extended.json COPY github_simple.json /app/github_simple.json COPY pdf_tools_-_rich_ui_for_in_context_basic_editing_.json /app/pdf_tools_-_rich_ui_for_in_context_basic_editing_.json # nginx config i tools HTML COPY nginx.conf /etc/nginx/nginx.conf RUN mkdir -p /app/tools /tmp/nginx_client /tmp/nginx_proxy /tmp/nginx_fastcgi /tmp/nginx_uwsgi /tmp/nginx_scgi COPY preset_creator.html /app/tools/preset_creator.html RUN chmod +x /app/setup_endpoints.sh /app/backup_restore.sh EXPOSE 8080 CMD bash -lc "\ bash /app/backup_restore.sh restore; \ bash /app/backup_restore.sh loop & \ python3 /app/tool_server.py & \ nginx -g 'daemon off;' & \ sleep 10 && bash /app/setup_endpoints.sh & \ bash start.sh"