EnzGamers commited on
Commit
c0f40a8
·
verified ·
1 Parent(s): 7bae347

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -10
Dockerfile CHANGED
@@ -1,24 +1,20 @@
1
  FROM docker.elastic.co/elasticsearch/elasticsearch:8.11.1
2
 
3
- # Variables d'environnement pour Elasticsearch
4
  ENV discovery.type=single-node
5
  ENV xpack.security.enabled=false
6
- ENV ES_JAVA_OPTS="-Xms1g -Xmx1g"
7
  ENV http.port=7860
8
- ENV http.host=0.0.0.0
9
- ENV http.cors.enabled=true
10
- ENV http.cors.allow-origin=$origin
11
- ENV http.cors.allow-headers="X-Requested-With,Content-Type,Content-Length,Authorization"
12
 
13
- # Exposer le port 7860 (requis par Hugging Face Spaces)
14
  EXPOSE 7860
15
 
16
- # Utiliser l'utilisateur non-root
17
  USER elasticsearch
18
 
19
- # Vérification de santé
20
  HEALTHCHECK --interval=30s --timeout=3s --start-period=30s --retries=3 \
21
  CMD curl -f http://localhost:7860/_cluster/health || exit 1
22
 
23
- # Démarrer Elasticsearch
24
  CMD ["/usr/local/bin/docker-entrypoint.sh"]
 
1
  FROM docker.elastic.co/elasticsearch/elasticsearch:8.11.1
2
 
3
+ # Set environment variables for Elasticsearch
4
  ENV discovery.type=single-node
5
  ENV xpack.security.enabled=false
6
+ ENV ES_JAVA_OPTS="-Xms512m -Xmx512m"
7
  ENV http.port=7860
 
 
 
 
8
 
9
+ # Expose port 7860 (required by Hugging Face Spaces)
10
  EXPOSE 7860
11
 
12
+ # Create a non-root user (HF Spaces requirement)
13
  USER elasticsearch
14
 
15
+ # Health check
16
  HEALTHCHECK --interval=30s --timeout=3s --start-period=30s --retries=3 \
17
  CMD curl -f http://localhost:7860/_cluster/health || exit 1
18
 
19
+ # Start Elasticsearch
20
  CMD ["/usr/local/bin/docker-entrypoint.sh"]