Skip to content

Instantly share code, notes, and snippets.

@iben12
Last active October 7, 2019 19:28
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 iben12/03440b08ce146eaa86dd882ae8b9bc66 to your computer and use it in GitHub Desktop.
Save iben12/03440b08ce146eaa86dd882ae8b9bc66 to your computer and use it in GitHub Desktop.
version: '3.2'
services:
logs:
image: sematext/logagent:3.0.2
environment:
- LOGS_TOKEN=
- REGION=EU
- GEOIP_ENABLED=true
- GEOIP_FIELDS=ClientHost
- REMOVE_FIELDS=request_Authorization,request_Cookie
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
deploy:
restart_policy:
condition: any
mode: global
agent:
image: sematext/agent:latest
environment:
- INFRA_TOKEN=
- CONTAINER_TOKEN=
- NODE_NAME="{{.Node.Hostname}}"
- REGION=EU
deploy:
restart_policy:
condition: any
mode: global
volumes:
- type: bind
source: /
target: /hostfs
read_only: true
- type: bind
source: /etc/passwd
target: /etc/passwd
read_only: true
- type: bind
source: /etc/group
target: /etc/group
read_only: true
- type: bind
source: /var/run
target: /var/run/
- type: bind
source: /sys/kernel/debug
target: /sys/kernel/debug
- type: bind
source: /sys
target: /host/sys
read_only: true
version: "3.4"
services:
traefik_init:
image: traefik:v1.7
command:
- "storeconfig"
- "--api"
- "--entrypoints=Name:http Address::80 Compress:true"
- "--entrypoints=Name:https Address::443 TLS Compress:true"
- "--defaultentrypoints=http,https"
- "--acme"
- "--acme.storage=/traefik/acme/account"
- "--acme.entryPoint=https"
- "--acme.httpChallenge.entryPoint=http"
- "--acme.onHostRule=true"
- "--acme.onDemand=false"
- "--acme.email=myemail"
- "--docker"
- "--docker.swarmMode"
- "--docker.exposedbydefault=false"
- "--docker.domain=mydomain.net"
- "--docker.watch"
- "--accessLog"
- "--accessLog.format=json"
- "--etcd"
- "--etcd.endpoint=etcd_store:2379"
- "--etcd.prefix=/traefik"
- "--etcd.useAPIV3=true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- gateway
- service
deploy:
restart_policy:
condition: on-failure
proxy:
image: traefik:v1.7
command:
- "--etcd"
- "--etcd.endpoint=etcd_store:2379"
- "--etcd.prefix=/traefik"
- "--etcd.useAPIV3=true"
networks:
- gateway
- service
ports:
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
placement:
constraints:
- node.role == manager
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
labels:
- "traefik.backend=traefik_proxy"
- "traefik.enable=true"
- "traefik.port=8080"
- "traefik.frontend.redirect.entryPoint=https"
- "traefik.frontend.auth.basic=myauth"
- "traefik.frontend.rule=Host:mydomain.net;PathPrefixStrip:/traefik"
networks:
gateway:
external: true
service:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment