From adcbe45f48eb783a941da67714165c8f78f2ce53 Mon Sep 17 00:00:00 2001 From: mathieu Date: Fri, 17 May 2024 23:26:23 +0200 Subject: [PATCH] chore: config ok --- docker-compose.yml | 42 ++++++++++++------------------------------ traefik.yml | 8 ++++---- 2 files changed, 16 insertions(+), 34 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 045c8eb..1187c72 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,42 +1,24 @@ version: '3' services: - traefik: - image: traefik:latest - container_name: "traefik" - restart: always + reverse-proxy: + # The official v3 Traefik docker image + image: traefik:v3.0 + # Enables the web UI and tells Traefik to listen to docker + command: --api.insecure=true --providers.docker ports: + # The HTTP port - "8888:80" - - "8443:443" - networks: - - web - - default - #env_file: - # - './conf/.ovh-api.env' + # The Web UI (enabled by --api.insecure=true) + - "8088:8080" volumes: - # Mapping sur le socket interne de Docker - - '/var/run/docker.sock:/var/run/docker.sock' - # Mapping du fichier de configuration statique - - '/volume1/docker/traefik/conf/traefik.yml:/etc/traefik/traefik.yml' - # Mapping du dossier contenant la configuration dynamique - #- './conf/dyn_traefik/:/dyn_traefik/' - # Mapping du fichier de stockage des certificats - #- './conf/acme.json:/acme.json' - labels: - - "traefik.enable=true" - - "traefik.http.routers.api.rule=Path(/api) " - - "traefik.http.routers.api.service=api@internal" - #- "traefik.http.routers.api.middlewares=auth" - #- "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0" + - /volume1/docker/traefik/conf/traefik.yml:/etc/traefik/traefik.yml + # So that Traefik can listen to the Docker events + - /var/run/docker.sock:/var/run/docker.sock whoami: # A container that exposes an API to show its IP address image: traefik/whoami labels: - - "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)" - - -networks: - web: - external: true \ No newline at end of file + - "traefik.http.routers.whoami.rule=path(`/whoami`)" diff --git a/traefik.yml b/traefik.yml index 0ed330f..abf1823 100644 --- a/traefik.yml +++ b/traefik.yml @@ -2,10 +2,10 @@ entryPoints: web: address: ":80" - asDefault: true + #asDefault: truxe - websecure: - address: ":443" +# websecure: +# address: ":443" # http: # redirections: # entryPoint: @@ -22,7 +22,7 @@ log: api: insecure: true dashboard: true - entryPoint: "websecure" +# entryPoint: "web" # docker: # endpoint: "unix:///var/run/docker.sock"