msfdfsd commited on
Commit
0abba97
·
verified ·
1 Parent(s): cec545a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -1,16 +1,21 @@
1
  FROM evoapicloud/evolution-api:latest
2
 
3
  USER root
4
- # إنشاء مجلد وتجهيز الصلاحيات
5
- RUN mkdir -p /evolution /data && chown -R 1000:1000 /evolution /data
6
 
7
- # الحل الجذري: إجبار التطبيق على عرض صفحة ترحيبية لنظام فحص Hugging Face
8
- RUN echo '<html><body style="font-family:sans-serif; text-align:center; padding-top:50px;"><h1>Evolution API is Running Successfully!</h1></body></html>' > /evolution/index.html
 
 
 
9
 
10
  ENV PORT=8080
11
  EXPOSE 8080
12
 
13
  USER 1000
14
 
15
- # أمر التشغيل المباشر
 
 
 
 
16
  CMD ["node", "dist/src/main.js"]
 
1
  FROM evoapicloud/evolution-api:latest
2
 
3
  USER root
 
 
4
 
5
+ # تثبيت أداة curl لعمل فحص داخلي سريع
6
+ RUN apk add --no-cache curl
7
+
8
+ # إعداد المجلدات والصلاحيات للمستخدم الآمن لـ Hugging Face
9
+ RUN mkdir -p /evolution /data && chown -R 1000:1000 /evolution /data
10
 
11
  ENV PORT=8080
12
  EXPOSE 8080
13
 
14
  USER 1000
15
 
16
+ # حيلة برمجية: إجبار الحاوية على إعطاء رد فورى لمنع إشارة الـ SIGTERM
17
+ HEALTHCHECK --interval=5s --timeout=3s --start-period=1s --retries=3 \
18
+ CMD curl -f http://localhost:8080/ || exit 1
19
+
20
+ # أمر تشغيل النسخة المستقرة مباشرة
21
  CMD ["node", "dist/src/main.js"]