version: "3.8" services: elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0 hostname: ${CN} restart: unless-stopped environment: - node.name=es01 - discovery.type=single-node # - bootstrap.memory_lock=true - "ES_JAVA_OPTS=-Xms2g -Xmx2g" ulimits: memlock: soft: -1 hard: -1 volumes: - ${DATA_PATH}/es/es01/data:/usr/share/elasticsearch/data - ${DATA_PATH}/es/es01/snapshots:/usr/share/elasticsearch/snapshots - ${DATA_PATH}/es/es01/config:/usr/share/elasticsearch/config ports: - 9200:9200 labels: - "co.elastic.logs/module=elasticsearch" kibana: image: docker.elastic.co/kibana/kibana:7.12.0 restart: unless-stopped networks: - proxy - default links: - "elasticsearch:${CN}" expose: - 5601 volumes: - ${DATA_PATH}/kb/config:/usr/share/kibana/config labels: - "traefik.enable=true" - "traefik.docker.network=proxy" - "traefik.http.middlewares.kb-redirect-websecure.redirectscheme.scheme=https" - "traefik.http.routers.kb-http.middlewares=kb-redirect-websecure" - "traefik.http.routers.kb-http.rule=Host(`${CN}`)" - "traefik.http.routers.kb-http.entrypoints=web" - "traefik.http.routers.kb-https.rule=Host(`${CN}`)" - "traefik.http.routers.kb-https.entrypoints=websecure" - "traefik.http.routers.kb-https.tls=true" - "traefik.http.routers.kb-https.tls.certresolver=myhttpchallenge" - "co.elastic.logs/module=kibana" networks: proxy: external: true