Skip to content

Instantly share code, notes, and snippets.

@chx
Created November 22, 2021 03:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chx/69e33970622c479fe9fa97c8aacae4fb to your computer and use it in GitHub Desktop.
Save chx/69e33970622c479fe9fa97c8aacae4fb to your computer and use it in GitHub Desktop.
version: "3.7"
# 10 Things to Consider When Planning Your Elasticsearch Project: https://ecmarchitect.com/archives/2015/07/27/4031
# Using Apache JMeter to Test Elasticsearch: https://ecmarchitect.com/archives/2014/09/02/3915
services:
db:
image: mysql:8.0
networks:
- elastic
environment:
MYSQL_DATABASE: drupal
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
volumes:
- "/var/lib/mysql:/var/lib/mysql"
restart: always
deploy:
placement:
constraints: [node.id == nkatrvbfaqnywckq8jhaajp1j]
drupal:
depends_on:
- db
networks:
- elastic
image: drupal_drupal:2020122800
ports:
- "8080:80"
labels:
- "traefik.docker.network=elastic"
- "traefik.frontend.rule=Host:drupal.admin.fortepan.hu"
- "traefik.enable=true"
- "traefik.port=80"
- "traefik.frontend.entryPoints=http,https"
- "traefik.default.protocol=http"
- "traefik.backend=elastic_drupal"
volumes:
- "/root/fortepan:/app"
- "/datavol:/datavol"
restart: always
deploy:
placement:
constraints: [node.id == nkatrvbfaqnywckq8jhaajp1j]
swarm-listener:
image: dockerflow/docker-flow-swarm-listener:latest
hostname: swarm-listener
networks:
- elastic
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
- DF_NOTIFY_CREATE_SERVICE_URL=http://proxy:8080/v1/docker-flow-proxy/reconfigure
- DF_NOTIFY_REMOVE_SERVICE_URL=http://proxy:8080/v1/docker-flow-proxy/remove
deploy:
placement:
constraints: [node.role == manager]
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION:-7.1.1}
environment:
- node.name={{.Node.Hostname}}
- discovery.seed_hosts=elasticsearch
- cluster.initial_master_nodes=${INITIAL_MASTER_NODES:-node1}
- cluster.name=Fortepan
- ELASTIC_PASSWORD=${ELASTICSEARCH_PASSWORD:-changeme}
- xpack.security.enabled=true
- xpack.license.self_generated.type=basic
- network.host=0.0.0.0
- http.cors.allow-origin=*
- http.cors.enabled=true
- http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
- http.cors.allow-credentials=true
networks:
- elastic
ulimits:
memlock:
soft: -1
hard: -1
ports:
- 9200:9200
volumes:
- "elasticsearch:/usr/share/elasticsearch/data"
labels:
- "traefik.docker.network=elastic"
- "traefik.frontend.rule=Host:es.admin.fortepan.hu"
- "traefik.enable=true"
- "traefik.port=9200"
- "traefik.frontend.entryPoints=http,https"
- "traefik.default.protocol=http"
- "traefik.backend=elastic_elasticsearch"
deploy:
mode: 'global'
#endpoint_mode: dnsrr
labels:
- com.df.notify=true
- com.df.distribute=true
- com.df.servicePath=/
- com.df.port=9200
- com.df.srcPort=9200
traefik:
image: traefik:1.7
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "./traefik:/etc/traefik"
labels:
- "traefik.enable=true"
- "traefik.backend=dashboard"
- "traefik.frontend.rule=Host:admin.fortepan.hu"
- "traefik.port=8083"
networks:
- elastic
networks:
elastic:
external: true
volumes:
elasticsearch:
logLevel = "ERROR"
defaultEntryPoints = ["https","http"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "admin.fortepan.hu"
watch = true
exposedByDefault = false
[acme]
email = "fortepan@negyesi.net"
entryPoint = "https"
storage = "/etc/traefik/acme.json"
caServer = "https://acme-v02.api.letsencrypt.org/directory"
onHostRule = true
[acme.httpChallenge]
entryPoint = "http"
delayBeforeCheck = 0
[[acme.domains]]
main = "admin.fortepan.hu"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment