Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save stefnestor/5408a0bbf638c80c6d8d3ba3257f7bf2 to your computer and use it in GitHub Desktop.
Save stefnestor/5408a0bbf638c80c6d8d3ba3257f7bf2 to your computer and use it in GitHub Desktop.
# docker-compose -f elastic_docker_singleNode_withSecurity.yaml -p "secure_elastic" up
version: '3'
services:
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.7
environment:
- bootstrap.memory_lock=true
- discovery.seed_hosts=elasticsearch
- discovery.type=single-node
- ELASTIC_PASSWORD=changeme
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=true
- xpack.license.self_generated.type=trial
- xpack.security.transport.ssl.enabled=true
- xpack.security.transport.ssl.keystore.path=elastic-stack-ca.p12
- xpack.security.transport.ssl.keystore.type=PKCS12
- xpack.security.transport.ssl.truststore.path=elastic-stack-ca.p12
- xpack.security.transport.ssl.truststore.type=PKCS12
- xpack.security.transport.ssl.verification_mode=certificate
volumes:
- {PATH_TO_LOCAL_CERTS}/elastic-stack-ca.p12:/usr/share/elasticsearch/config/elastic-stack-ca.p12:ro
ports: ["9200:9200"]
networks: ["elastic"]
kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:7.17.7
environment:
ELASTICSEARCH_URL: "http://elasticsearch:9200"
ELASTICSEARCH_USERNAME: "elastic"
ELASTICSEARCH_PASSWORD: "changeme"
ports: ["5601:5601"]
depends_on: ["elasticsearch"]
networks: ["elastic"]
networks:
elastic:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment