Spaces:
Sleeping
Sleeping
| FROM docker.elastic.co/elasticsearch/elasticsearch:8.11.1 | |
| # Set environment variables for Elasticsearch | |
| ENV discovery.type=single-node | |
| ENV xpack.security.enabled=false | |
| ENV ES_JAVA_OPTS="-Xms512m -Xmx512m" | |
| ENV http.port=7860 | |
| # Expose port 7860 (required by Hugging Face Spaces) | |
| EXPOSE 7860 | |
| # Create a non-root user (HF Spaces requirement) | |
| USER elasticsearch | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=3s --start-period=30s --retries=3 \ | |
| CMD curl -f http://localhost:7860/_cluster/health || exit 1 | |
| # Start Elasticsearch | |
| CMD ["/usr/local/bin/docker-entrypoint.sh"] |