version: '3' services: grafana: image: grafana/grafana:latest container_name: grafana volumes: # Data persistency # sudo mkdir -p /srv/docker/grafana/data; chown 472:472 /srv/docker/grafana/data - "${DIR}/grafana:/var/lib/grafana" labels: - "traefik.enable=true" - "traefik.http.routers.grafana.rule=Host(`grafana.localhost`)" - "traefik.http.routers.grafana.entrypoints=web" - "traefik.http.services.grafana-service.loadbalancer.server.port=3000" gitea: image: gitea/gitea:latest container_name: gitea restart: always environment: - USER_UID=1000 - USER_GID=1000 volumes: - ${DIR}/gitea:/data ports: - "2221:22" labels: - "traefik.enable=true" - "traefik.http.routers.gitea.rule=Host(`gitea.localhost`)" - "traefik.http.routers.gitea.entrypoints=web" - "traefik.http.services.gitea-service.loadbalancer.server.port=3000" whoami: # A container that exposes an API to show its IP address image: containous/whoami labels: - "traefik.enable=true" - "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)" - "traefik.http.routers.whoami.entrypoints=web" mqtt: image: eclipse-mosquitto container_name: mqtt ports: - "1885:1883" - "9001:9001" volumes: - "${DIR}/mosquitto/config:/mosquitto/config" - ${DIR}/mosquitto/data:/mosquitto/data - ${DIR}/mosquitto/log:/mosquitto/log labels: - "traefik.http.routers.mqtt.rule=Host(`mqtt.localhost`)" - "traefik.http.routers.mqtt.entrypoints=mqtt" - "traefik.http.services.mqtt-service.loadbalancer.server.port=9001" - "traefik.enable=true" node-red: image: nodered/node-red:latest container_name: "node-red" environment: - TZ=Europe/Stockholm ports: - "1881:1880" #devices: #- /dev/ttyAMA0 restart: unless-stopped volumes: - ${DIR}/nodered:/data labels: - "traefik.http.routers.node-red.rule=Host(`node.localhost`)" - "traefik.http.routers.node-red.entrypoints=web" - "traefik.http.services.node-red-service.loadbalancer.server.port=1880" - "traefik.enable=true" domoticz: image: linuxserver/domoticz container_name: domoticz environment: - PUID=1000 - PGID=1000 - TZ=Europe/Stockholm #- WEBROOT=domoticz #optional volumes: - ${DIR}/domoticz:/config ports: - 8081:8080 #devices: #- path to device:path to device restart: unless-stopped labels: - "traefik.http.routers.domo.rule=Host(`domo.localhost`)" - "traefik.http.routers.domo.entrypoints=web" - "traefik.http.services.domo-service.loadbalancer.server.port=8080" - "traefik.enable=true" reverse-proxy: # The official v2.0 Traefik docker image image: traefik:v2.0 container_name: "traefik" ports: # The HTTP port - "80:80" - "8080:8080" volumes: # So that Traefik can listen to the Docker events - /var/run/docker.sock:/var/run/docker.sock - ./traefik.yml:/etc/traefik/traefik.yml - ./static_config.yml:/etc/traefik/static_config.yml labels: - "traefik.http.routers.traefik.rule=Host(`tr.localhost`)" - "traefik.http.routers.traefik.entrypoints=web" - "traefik.http.services.traefik-service.loadbalancer.server.port=8080" - "traefik.enable=true"