Update Dockerfile
Browse files- Dockerfile +26 -29
Dockerfile
CHANGED
|
@@ -5,39 +5,36 @@ 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 |
-
|
| 11 |
-
server:\
|
| 12 |
-
port: 7860\
|
| 13 |
-
bind_address:
|
| 14 |
-
secret_key: '
|
| 15 |
-
base_url: false\
|
| 16 |
-
search:\
|
| 17 |
-
|
| 18 |
-
autocomplete:
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
default_locale: 'ar'\n\
|
| 28 |
-
query_in_title: true\n" > /etc/searxng/settings.yml
|
| 29 |
|
| 30 |
-
# سكريبت ال
|
| 31 |
-
RUN echo '#!/bin/sh' > /
|
| 32 |
-
echo 'while true; do' >> /
|
| 33 |
-
echo '
|
| 34 |
-
echo '
|
| 35 |
-
echo '
|
| 36 |
-
|
| 37 |
-
chmod +x /start_anesnt.sh
|
| 38 |
|
| 39 |
RUN chown -R searxng:searxng /etc/searxng
|
| 40 |
USER searxng
|
| 41 |
EXPOSE 7860
|
| 42 |
|
| 43 |
-
CMD ["/
|
|
|
|
| 5 |
ENV SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml
|
| 6 |
USER root
|
| 7 |
|
| 8 |
+
# إنشاء ملف الإعدادات ببنية كاملة لمنع أخطاء الـ Validation
|
| 9 |
RUN mkdir -p /etc/searxng && \
|
| 10 |
+
echo 'use_default_settings: false' > /etc/searxng/settings.yml && \
|
| 11 |
+
echo 'server:' >> /etc/searxng/settings.yml && \
|
| 12 |
+
echo ' port: 7860' >> /etc/searxng/settings.yml && \
|
| 13 |
+
echo ' bind_address: "0.0.0.0"' >> /etc/searxng/settings.yml && \
|
| 14 |
+
echo ' secret_key: "anesnt_secret_secure_key"' >> /etc/searxng/settings.yml && \
|
| 15 |
+
echo ' base_url: false' >> /etc/searxng/settings.yml && \
|
| 16 |
+
echo 'search:' >> /etc/searxng/settings.yml && \
|
| 17 |
+
echo ' formats: ["html", "json"]' >> /etc/searxng/settings.yml && \
|
| 18 |
+
echo ' autocomplete: "duckduckgo"' >> /etc/searxng/settings.yml && \
|
| 19 |
+
echo 'engines:' >> /etc/searxng/settings.yml && \
|
| 20 |
+
echo ' - name: duckduckgo' >> /etc/searxng/settings.yml && \
|
| 21 |
+
echo ' engine: duckduckgo' >> /etc/searxng/settings.yml && \
|
| 22 |
+
echo ' shortcut: ddg' >> /etc/searxng/settings.yml && \
|
| 23 |
+
echo 'ui:' >> /etc/searxng/settings.yml && \
|
| 24 |
+
echo ' default_locale: "ar"' >> /etc/searxng/settings.yml && \
|
| 25 |
+
echo ' query_in_title: true' >> /etc/searxng/settings.yml && \
|
| 26 |
+
echo 'enabled_plugins: ["Basic Metadata"]' >> /etc/searxng/settings.yml
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
# سكريبت التشغيل الذي لا ينطفئ
|
| 29 |
+
RUN echo '#!/bin/sh' > /start.sh && \
|
| 30 |
+
echo 'while true; do' >> /start.sh && \
|
| 31 |
+
echo ' python3 -m searx.webapp' >> /start.sh && \
|
| 32 |
+
echo ' sleep 3' >> /start.sh && \
|
| 33 |
+
echo 'done' >> /start.sh && \
|
| 34 |
+
chmod +x /start.sh
|
|
|
|
| 35 |
|
| 36 |
RUN chown -R searxng:searxng /etc/searxng
|
| 37 |
USER searxng
|
| 38 |
EXPOSE 7860
|
| 39 |
|
| 40 |
+
CMD ["/start.sh"]
|