Körde du med linuxserver/grocy:latest när du testade med docker? Det är den jag kör med bakom Traefik 2.0 vilket fungerar fint.
Här har du min docker-compose.yml för Grocy-instansen som fungerande exempel. Bortse ifrån alla labels om du inte själv har en Traefik 2.0 konfigurerad och igång redan samt networks-segmenten då detta bara finns där för att knyta in till proxy-nätverket.
Kod:
---
version: "2"
networks:
proxy-network:
external: true
services:
grocy:
image: linuxserver/grocy:latest
container_name: grocy
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Stockholm
volumes:
- ./data:/config
networks:
- proxy-network
## Dessa bör sättas om du inte kör bakom proxy ##
# ports:
# - valfri publik port:80
restart: always
labels:
- "com.ouroboros.enable=true"
- "traefik.enable=true"
- "traefik.http.routers.grocy-http.entrypoints=http"
- "traefik.http.routers.grocy-http.rule=Host(`grocy.dindomän.se`)"
- "traefik.http.routers.grocy-http.middlewares=redirect@file"
- "traefik.http.routers.grocy-https.entrypoints=https"
- "traefik.http.routers.grocy-https.rule=Host(`grocy.dindomän.se`)"
- "traefik.http.routers.grocy-https.service=grocy-https"
- "traefik.http.services.grocy-https.loadbalancer.passhostheader=true"
- "traefik.http.services.grocy-https.loadbalancer.server.port=80"
- "traefik.http.routers.grocy-https.tls=true"
- "traefik.http.routers.grocy-https.middlewares=sts-headers@file,compress@file"
Denna docker-compose.yml är nedskalad till direktexponerad på port 8080 utan https/certifikat.
Kod:
---
version: "2"
services:
grocy:
image: linuxserver/grocy:latest
container_name: grocy
environment:
# För att ta reda på PUID/GUID, kör kommandot "id" som önskad docker-användare
- PUID=1000
- PGID=1000
- TZ=Europe/Stockholm
volumes:
- ./data:/config
ports:
- 8080:80
restart: always