You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Florestan Bredow 66f3d36482 Migrate conf file to yaml ; add dynamix configuration 2 years ago
conf Migrate conf file to yaml ; add dynamix configuration 2 years ago
.gitignore Protects dashboard 3 years ago
README.md Hide unexposed containers 3 years ago
docker-compose.yml Migrate conf file to yaml ; add dynamix configuration 2 years ago

README.md

Configuration Traefic.

Pour démarrer :

touch conf/acme.json
chmod 600 conf/acme.json
docker network create web

Créer et remplir le fichier .env sur ce modèle :

HOSTNAME=host.domain.tld
DASHBOARDUSERS=username:mot_de_passe_chiffré_avec_htpasswd

Pour créer le mot de passe utiliser la commande

htpasswd -n [username]

Pour ajouter un service :

Dans le fichier docker-compose.yml de ce service , ajouter le réseau web :

networks:
  web:
    external: true
  backend:

Dans ce même fichier sur le service qui va être lié au proxy le connecter au réseau et ajouter les paramètres qui vont bien :

version: "3.8"

services:
  MonService:
    [...]
    networks:
      - web
      - backend
    labels:
      - traefik.enable=true
      - traefik.http.routers.host_domaine_tld.rule=Host(`host.domain.tld`)
      - traefik.http.routers.host_domaine_tld.tls=true
      - traefik.http.routers.host_domaine_tld.tls.certresolver=myresolver
      - traefik.http.services.host_domaine_tld.loadbalancer.server.port=80
    [...]

Penser à remplacer host.domaine.tls et host_domain_tld par les valeurs qui vont bien.

Les services qui ne sont pas exposé doivent être ajouté au réseau backend.

services:
  MonService:
    [...]
    networks:
      - backend
    [...]

Si il n'y a qu'un service, inutile d'ajouter le réseau backend