mirror of
https://github.com/PAPAMICA/docker-compose-collection.git
synced 2026-03-18 21:30:41 +01:00
add traefik
This commit is contained in:
@@ -17,6 +17,41 @@
|
||||
"container": "/var/lib/registry"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"type": 3,
|
||||
"title": "Traefik",
|
||||
"description": "Reverse proxy",
|
||||
"note": "<p>Site de l'application : <a href=\"https:\/\/traefik.io\/\" target=\"_blank\" rel=\"noopener\">traefik.io<\/a>",
|
||||
"categories": [
|
||||
"SelfHosting",
|
||||
"PAPAMICA"
|
||||
],
|
||||
"platform": "linux",
|
||||
"logo": "https://styles.redditmedia.com/t5_fucxb/styles/communityIcon_dr8ojdk0l2d51.png",
|
||||
"repository": {
|
||||
"url": "https://github.com/PAPAMICA/docker-compose-collection",
|
||||
"stackfile": "traefik.yml"
|
||||
},
|
||||
"env": [{
|
||||
"name": "SERVICE",
|
||||
"label": "Nom du service"
|
||||
},
|
||||
{
|
||||
"name": "DATA_LOCATION",
|
||||
"label": "Localisation des données",
|
||||
"description": "exemple /_data/apps"
|
||||
},
|
||||
{
|
||||
"name": "ADMIN",
|
||||
"label": "Utilisateur et mot de passe admin (voir documentation)",
|
||||
"description": "exemple PAPAMICA:{SHA}XXXXXxxxxxXXXXxxX="
|
||||
},
|
||||
{
|
||||
"name": "URL",
|
||||
"label": "Lien du dashboard complet",
|
||||
"description": "exemple : traefik.papamica.com"
|
||||
}]
|
||||
},
|
||||
|
||||
{
|
||||
"type": 3,
|
||||
|
||||
44
traefik.yml
Normal file
44
traefik.yml
Normal file
@@ -0,0 +1,44 @@
|
||||
# Docker-compose mis à disposition par Mickael "PAPAMICA" Asseline
|
||||
# Date de mise à jour : 21/05/2022
|
||||
|
||||
# Variables d'environnement à déclarer :
|
||||
# - SERVICE : nom du service (exemple : plex)
|
||||
# - DATA_LOCATION : localisation des données (exemple /apps/"service")
|
||||
# - URL : Site web du service (exemple : url.papamica.fr)
|
||||
# - ADMIN : ADMIN_USER:ADMIN_PASSWORD
|
||||
|
||||
# Fonctionne avec Portainer
|
||||
version: "3.3"
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:latest
|
||||
container_name: $SERVICE
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: grep -qr "traefik" /proc/*/status || exit 1
|
||||
interval: 1m
|
||||
timeout: 30s
|
||||
retries: 3
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- $DATA_LOCATION/traefik/config/traefik.yml:/traefik.yml:ro
|
||||
- $DATA_LOCATION/traefik/config/config.yml:/config.yml:ro
|
||||
- $DATA_LOCATION/traefik/config/acme.json:/acme.json
|
||||
labels:
|
||||
traefik.enable: true
|
||||
traefik.http.routers.api.entrypoints: https
|
||||
traefik.http.routers.api.rule: Host(`$URL`)
|
||||
traefik.http.routers.api.service: api@internal
|
||||
traefik.http.routers.api.middlewares: auth
|
||||
traefik.http.middlewares.auth.basicauth.users: $ADMIN
|
||||
networks:
|
||||
- proxy
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external:
|
||||
name: proxy
|
||||
Reference in New Issue
Block a user