90 lines
2.4 KiB
YAML
90 lines
2.4 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
syncthing:
|
|
image: linuxserver/syncthing
|
|
container_name: syncthing
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=Europe/Stockholm
|
|
- UMASK_SET=022
|
|
volumes:
|
|
- ./syncthing/config:/config
|
|
- /mnt/johanna_backup:/data1
|
|
ports:
|
|
- 8384:8384
|
|
- 22000:22000
|
|
- 21027:21027/udp
|
|
networks:
|
|
- frontend
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
|
|
mqtt:
|
|
image: eclipse-mosquitto:1.6.10
|
|
container_name: mqtt
|
|
networks:
|
|
- frontend
|
|
- backend
|
|
restart: always
|
|
ports:
|
|
- "1883:1883"
|
|
- "9001:9001"
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=Europe/Stockholm
|
|
volumes:
|
|
- ./main/mosquitto/mosquitto.conf:/mqtt/mosquitto.conf
|
|
- ${DIR}/mqtt/data:/mqtt/data
|
|
- ${DIR}/mqtt/log:/mqtt/log
|
|
labels:
|
|
- "traefik.http.routers.mqtt.rule=Host(`mqtt.${DOMAIN}`)"
|
|
- "traefik.http.routers.mqtt.entrypoints=mqtt"
|
|
- "traefik.http.services.mqtt-service.loadbalancer.server.port=9001"
|
|
- "traefik.enable=true"
|
|
|
|
|
|
traefik:
|
|
# The official v2.0 Traefik docker image
|
|
image: traefik
|
|
container_name: "traefik"
|
|
networks:
|
|
- backend
|
|
- frontend
|
|
ports:
|
|
# The HTTP port
|
|
- "80:80"
|
|
- "443:443"
|
|
- "8080:8080"
|
|
volumes:
|
|
# So that Traefik can listen to the Docker events
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ./main/traefik.yml:/etc/traefik/traefik.yml
|
|
- ./main/static_config.yml:/etc/traefik/static_config.yml
|
|
# - "./log.json:/etc/traefik/log.json"
|
|
#- ./acme.json:/acme.json
|
|
- ./main/letsencrypt:/letsencrypt
|
|
dns:
|
|
- 8.8.8.8
|
|
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.traefik.rule=Host(`tra.${DOMAIN}`)"
|
|
- "traefik.http.routers.traefik-secure.entrypoints=web-secure"
|
|
- "traefik.http.routers.traefik-secure.rule=Host(`tra.${DOMAIN}`)"
|
|
- "traefik.http.routers.traefik-secure.tls.certresolver=milvert"
|
|
- "traefik.http.routers.traefik-secure.tls=true"
|
|
- "traefik.http.services.traefik-service.loadbalancer.server.port=8080"
|
|
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
|
|
- "traefik.http.middlewares.traefik-auth.basicauth.users=simon:$$apr1$$o3vIe.DX$$3XExiBMe8rUo3HujDSYEo0"
|
|
|
|
networks:
|
|
frontend:
|
|
external: true
|
|
backend:
|
|
external: false
|
|
|