AnesKAM commited on
Commit
4c8cca6
·
verified ·
1 Parent(s): 4664a06

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +40 -0
Dockerfile ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM searxng/searxng:latest
2
+
3
+ # إعدادات البيئة لضمان استقرار البورت
4
+ ENV PORT=7860
5
+ ENV SEARXNG_PORT=7860
6
+ ENV SEARXNG_SETTINGS_PATH=/etc/searxng/settings.yml
7
+ USER root
8
+
9
+ # إنشاء إعدادات مخصصة لتعطيل المحركات التي تسبب الانهيار
10
+ RUN mkdir -p /etc/searxng && \
11
+ echo "use_default_settings: True" > /etc/searxng/settings.yml && \
12
+ echo "server:" >> /etc/searxng/settings.yml && \
13
+ echo " port: 7860" >> /etc/searxng/settings.yml && \
14
+ echo " bind_address: '0.0.0.0'" >> /etc/searxng/settings.yml && \
15
+ echo " secret_key: '$(openssl rand -hex 32)'" >> /etc/searxng/settings.yml && \
16
+ echo "general:" >> /etc/searxng/settings.yml && \
17
+ echo " instance_name: 'AnesNT Search'" >> /etc/searxng/settings.yml && \
18
+ echo "engines:" >> /etc/searxng/settings.yml && \
19
+ echo " - name: google" >> /etc/searxng/settings.yml && \
20
+ echo " disabled: False" >> /etc/searxng/settings.yml && \
21
+ echo " - name: bing" >> /etc/searxng/settings.yml && \
22
+ echo " disabled: False" >> /etc/searxng/settings.yml && \
23
+ echo " - name: wikidata" >> /etc/searxng/settings.yml && \
24
+ echo " disabled: True" >> /etc/searxng/settings.yml && \
25
+ echo " - name: karmasearch" >> /etc/searxng/settings.yml && \
26
+ echo " disabled: True" >> /etc/searxng/settings.yml && \
27
+ echo " - name: pexels" >> /etc/searxng/settings.yml && \
28
+ echo " disabled: True" >> /etc/searxng/settings.yml && \
29
+ echo " - name: unsplash" >> /etc/searxng/settings.yml && \
30
+ echo " disabled: True" >> /etc/searxng/settings.yml && \
31
+ echo " - name: youtube" >> /etc/searxng/settings.yml && \
32
+ echo " disabled: True" >> /etc/searxng/settings.yml
33
+
34
+ # ضبط الصلاحيات للمستخدم الرسمي
35
+ RUN chown -R searxng:searxng /etc/searxng
36
+ USER searxng
37
+ EXPOSE 7860
38
+
39
+ # تشغيل المحرك
40
+ CMD ["python3", "-m", "searx.webapp"]