chore: config ok

This commit is contained in:
mathieu 2024-05-17 23:26:23 +02:00
parent ec421605d7
commit adcbe45f48
2 changed files with 16 additions and 34 deletions

View File

@ -1,42 +1,24 @@
version: '3' version: '3'
services: services:
traefik: reverse-proxy:
image: traefik:latest # The official v3 Traefik docker image
container_name: "traefik" image: traefik:v3.0
restart: always # Enables the web UI and tells Traefik to listen to docker
command: --api.insecure=true --providers.docker
ports: ports:
# The HTTP port
- "8888:80" - "8888:80"
- "8443:443" # The Web UI (enabled by --api.insecure=true)
networks: - "8088:8080"
- web
- default
#env_file:
# - './conf/.ovh-api.env'
volumes: volumes:
# Mapping sur le socket interne de Docker - /volume1/docker/traefik/conf/traefik.yml:/etc/traefik/traefik.yml
- '/var/run/docker.sock:/var/run/docker.sock' # So that Traefik can listen to the Docker events
# Mapping du fichier de configuration statique - /var/run/docker.sock:/var/run/docker.sock
- '/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"
whoami: whoami:
# A container that exposes an API to show its IP address # A container that exposes an API to show its IP address
image: traefik/whoami image: traefik/whoami
labels: labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)" - "traefik.http.routers.whoami.rule=path(`/whoami`)"
networks:
web:
external: true

View File

@ -2,10 +2,10 @@
entryPoints: entryPoints:
web: web:
address: ":80" address: ":80"
asDefault: true #asDefault: truxe
websecure: # websecure:
address: ":443" # address: ":443"
# http: # http:
# redirections: # redirections:
# entryPoint: # entryPoint:
@ -22,7 +22,7 @@ log:
api: api:
insecure: true insecure: true
dashboard: true dashboard: true
entryPoint: "websecure" # entryPoint: "web"
# docker: # docker:
# endpoint: "unix:///var/run/docker.sock" # endpoint: "unix:///var/run/docker.sock"