Create Dockerfile
Browse files- Dockerfile +46 -0
Dockerfile
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM searxng/searxng:latest
|
| 2 |
+
|
| 3 |
+
ENV PORT=7860
|
| 4 |
+
ENV SEARXNG_PORT=7860
|
| 5 |
+
ENV SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml
|
| 6 |
+
USER root
|
| 7 |
+
|
| 8 |
+
# إعدادات صارمة جداً: تعطيل الإضافات غير المستقرة وحصر المحركات في الأقوى فقط
|
| 9 |
+
RUN mkdir -p /etc/searxng && \
|
| 10 |
+
printf "use_default_settings: false\n\
|
| 11 |
+
server:\n\
|
| 12 |
+
port: 7860\n\
|
| 13 |
+
bind_address: '0.0.0.0'\n\
|
| 14 |
+
secret_key: 'anesnt_ultra_stable_$(openssl rand -hex 16)'\n\
|
| 15 |
+
search:\n\
|
| 16 |
+
formats:\n\
|
| 17 |
+
- html\n\
|
| 18 |
+
- json\n\
|
| 19 |
+
safe_search: 1\n\
|
| 20 |
+
autocomplete: 'duckduckgo'\n\
|
| 21 |
+
engines:\n\
|
| 22 |
+
- name: duckduckgo\n\
|
| 23 |
+
engine: duckduckgo\n\
|
| 24 |
+
shortcut: ddg\n\
|
| 25 |
+
- name: wikipedia\n\
|
| 26 |
+
engine: wikipedia\n\
|
| 27 |
+
shortcut: wp\n\
|
| 28 |
+
ui:\n\
|
| 29 |
+
static_path: 'static'\n\
|
| 30 |
+
templates_path: 'templates'\n\
|
| 31 |
+
default_locale: 'ar'\n" > /etc/searxng/settings.yml
|
| 32 |
+
|
| 33 |
+
# سكريبت الحماية القصوى (Restart Policy)
|
| 34 |
+
RUN echo '#!/bin/sh' > /start_anesnt.sh && \
|
| 35 |
+
echo 'while true; do' >> /start_anesnt.sh && \
|
| 36 |
+
echo ' echo "[Genisi System] Launching Stable Engine..."' >> /start_anesnt.sh && \
|
| 37 |
+
echo ' python3 -m searx.webapp' >> /start_anesnt.sh && \
|
| 38 |
+
echo ' sleep 1' >> /start_anesnt.sh && \
|
| 39 |
+
echo 'done' >> /start_anesnt.sh && \
|
| 40 |
+
chmod +x /start_anesnt.sh
|
| 41 |
+
|
| 42 |
+
RUN chown -R searxng:searxng /etc/searxng
|
| 43 |
+
USER searxng
|
| 44 |
+
EXPOSE 7860
|
| 45 |
+
|
| 46 |
+
CMD ["/start_anesnt.sh"]
|