dimanche 24 novembre 2019

docker-compose pour jeedom avec docker et traefik 2

Voici mon docker-compose:


version: '2.3'

services:

  jeedom-server:
    container_name: jeedom-server
    image: jeedom/jeedom:master
    networks:
     - traefik
     - internal
    labels:
     - "traefik.enable=true"
     - "traefik.http.middlewares.https-only-jeedom.redirectscheme.scheme=https"
     - "traefik.http.routers.jeedom.middlewares=https-only-jeedom"
     - "traefik.http.routers.jeedom.rule=Host(`jeedom.domain.net`)"
     - "traefik.http.routers.jeedom.entrypoints=web"
     - "traefik.http.routers.jeedom-secured.rule=Host(`jeedom.domain.net`)"                                                                                                                                                                
     - "traefik.http.services.jeedom.loadbalancer.server.port=80"
     - "traefik.docker.network=traefik"
     - "traefik.http.routers.jeedom-secured.entrypoints=websecure"
     - "traefik.http.routers.jeedom-secured.tls.certresolver=myhttpchallenge"
    ports:
     - "9070:80"
    volumes:
     - /home/docker/jeedom/data/jeedom:/var/www/html
    depends_on:
     - db
    devices:
      - "/dev/ttyUSB0:/dev/ttyUSB0"
      - "/dev/ttyUSB1:/dev/ttyUSB1"
    mac_address: 03:45:aa:bb:cc:dd
    restart: always

  db:
    container_name: jeedom-mysql
    image: mysql:5.7
    command: --default-authentication-plugin=mysql_native_password
    networks:
     - internal
    volumes:
     - /home/docker/jeedom/data/mysql:/var/lib/mysql
    environment:
     - MYSQL_DATABASE=jeedom
     - MYSQL_USER=jeedom
     - MYSQL_PASSWORD=jeedom_mdp
     - MYSQL_ROOT_PASSWORD=mdp_root
    labels:
     - "traefik.enable=false"
    restart: always

networks:
   traefik:
     external: true
   internal:
     external: false


Aucun commentaire:

Enregistrer un commentaire