une astuce pour faire fonctionner subsonic premium en docker-traefik
Je fais un raccourci, pour les explications n'hesiter pas a demander
traefik.toml
defaultEntryPoints = ["https","http"]
InsecureSkipVerify = true
[api]
entryPoint = "traefik"
dashboard = true
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]
minVersion = "VersionTLS12"
cipherSuites = [
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"
]
[entryPoints.traefik]
address = ":8080"
[acme]
email = "votre _adresse_mail"
storage = "/etc/traefik/acme/acme.json"
entryPoint = "https"
onHostRule = true
onDemand = false
[acme.httpChallenge]
entryPoint = "http"
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "votre_domaine"
watch = true
exposedbydefault = false
docker-compose
version: '3.3'
services:
traefik:
image: traefik
container_name: traefik
restart: unless-stopped
hostname: traefik
labels:
- traefik.enable=true
- traefik.frontend.rule=Host:traefik.domaine.com
- traefik.port=8080
- traefik.docker.network=traefik_proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /home/<user>/traefik/traefik.toml:/traefik.toml:ro
- /home/<user>/letsencrypt/certs:/etc/traefik/acme:rw
- /var/log/traefik:/var/log
ports:
- "80:80"
- "443:443"
networks:
- proxy
command:
- --web
- --accessLog.filePath=/var/log/access.log
- --accessLog.filters.statusCodes=400-499
subsonic:
container_name: subsonic
image: hurricane/subsonic
restart: unless-stopped
hostname: subsonic
labels:
- traefik.backend=subsonic
- traefik.enable=true
- traefik.frontend.rule=Host:subsonic.votre_domaine.com
- traefik.port=4040
- traefik.docker.network=traefik_proxy
environment:
- APP_UID=1000
- APP_GID=1000
- TZ=Paris/Europe
volumes:
- /home/<user>/subsonic/log:/subsonic
- /home/<user>/subsonic/music:/music
- /home/<user>/subsonic/podcast:/podcast
networks:
- proxy
networks:
proxy:
external:
name: traefik_proxy
une fois le container lancé, et ce de maniere a mettre à jour subsonic, on fait:
docker exec subsonic update
docker restart subsonic
docker exec subsonic bash -c "echo '127.0.0.1 localhost.localdomain localhost subsonic.org' >> /etc/hosts"
Et on rentre les identifiants donnés plus haut par @404 pour passer en premium.
Voilà vous avez un accès en https://sous domaine.domaine
Fonctionnel sauf l’accès au menu paramètres, home et joué. L’accès aux paramètres se fait en descendant la souris plus bas.
Je pense que ce bug est lié au labels de traefik et j'ai pas reussi a trouver. Je pense aussi à un problème de contenu mixte bloqué par firefox puisque lorsque je désactive la protection firefox, donc plus de https, tout redevient fonctionnel. Si un pro de traefik passe dans le coin.
Un backend, frontend à configurer probablement
Merci