htpcbeginner / atomic-toolkit-docker Goto Github PK
View Code? Open in Web Editor NEWMoved - https://github.com/htpcBeginner/docker-traefik
License: MIT License
Moved - https://github.com/htpcBeginner/docker-traefik
License: MIT License
Hi,
I've noticed that this docker-compose and the guide on your website mostly focuses on using subdomains instead of subdirectories. As you already mentioned, for example some apps need an extra /
at the end of the URL to load correctly. I've played around and noticed that some other apps require even more configuration for them to work correctly in subdirectories.
I spent a whole day trying to figure out why my Nextcloud was not loading correctly. I thought the problem was related to Traefik, since the JS and CSS files could not be loaded due to a MIME type mismatch. When using Nextcloud on a subdomain it worked fine.
After trying various configuration constellations I finally found out what was wrong. Nextcloud needs a special configuration parameter for it to work correctly in subdomains. In ~/docker/nextcloud/www/nextcloud/config/config.php
I added the following line:
'overwritewebroot' => '/XXX'
where XXX
is your subdirectory as configured in Traefik. And it finally worked! I think it has to do with some of the headers Traefik gives to the Nextcloud Apache.
I think other apps might need some special configuration as well for them to work correctly in subdirectories. Would be great if you could add it to your very helpful Traefik Reverse Proxy tutorial, should others have the same problem.
Hey, this is awesome! I'm wondering if you could add a few more apps, just to round out the mix.
Watcher (Another movie fetcher)
Headphones (Music)
Lidarr (Another Music, Radarr/Sonarr based)
Flex TV (My own app, allows voice control of pretty much everything else you've got in here)
Also, I'd be interested in taking this a step further, and actually writing out a guide as to how to use it, and maybe providing the initial blank file system with configs and stuff so that it'd theoretically just "start working".
Been trying since this afternoon to make this work.
After multiple failed attempts, I removed everyting else
from the yml file and left only traefik and networks:
version: "3.6"
services:
traefik:
hostname: traefik
image: traefik:latest
container_name: traefik
restart: always
domainname: ${DOMAINNAME}
networks:
- default
- traefik_proxy
ports:
- "80:80"
- "443:443"
- "8080:8080"
environment:
- CLOUDFLARE_EMAIL=${CLOUDFLARE_EMAIL}
- CLOUDFLARE_API_KEY=${CLOUDFLARE_API_KEY}
labels:
- "traefik.enable=true"
- "traefik.backend=traefik"
- "traefik.frontend.rule=Host:traefik.${DOMAINNAME}"
- "traefik.port=8080"
- "traefik.docker.network=traefik_proxy"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=example.com"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
- "traefik.frontend.headers.frameDeny=true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ${USERDIR}/docker/traefik:/etc/traefik
- ${USERDIR}/docker/shared:/shared
networks:
traefik_proxy:
external:
name: traefik_proxy
default:
driver: bridge
This is what I get when trying to get the logs:
docker-compose -f docker-compose.yml up -d
Pulling traefik (traefik:latest)...
latest: Pulling from library/traefik
7a433ecdf92b: Pull complete
d759fcb7fc9b: Pull complete
Creating traefik ...
Pulling traefik (traefik:latest)...
Creating traefik ... done
docker-compose logs -tf --tail="50" traefik
Attaching to traefik
and stays there for ever. Trying to access the hosts internal ip or externaly I
a 404 page not found. What am i doing wrong???
ERROR: yaml.parser.ParserError: while parsing a block mapping
in "./docker-compose-traefik.yml", line 5, column 1
expected , but found ''
in "./docker-compose-traefik.yml", line 149, column 3
Any ideas?
Good night,
I have start play around with add rtorrent/rutorrent bad get all the time bad gateway, please anyone can check code?
rutorrent:
image: linuxserver/rutorrent
container_name: rutorrent
restart: always
ports:
- 88:80
- 5000:5000
- 51413:51413
- 6881:6881/udp
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock
- ${USERDIR}/media/:/media
- ${USERDIR}/downloads:/data/watch
- ${USERDIR}/downloads/completed:/data/completed
- ${USERDIR}/downloads/incomplete:/data/incomplete
- ${USERDIR}/docker/rutorrent/config:/config
- ${USERDIR}/docker/shared:/shared
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
- RUTORRENT_INCOMPLETE_DIR=/downloads/incomplete
- RUTORRENT_INCOMPLETE_DIR_ENABLED=true
- RUTORRENT_WATCH_DIR=/downloads
- RUTORRENT_WATCH_DIR_ENABLED=true
- RUTORRENT_DOWNLOAD_DIR=/downloads/completed
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.backend=rutorrent"
- "traefik.frontend.rule=Host:${DOMAINNAME}; PathPrefixStrip: /rutorrent"
- "traefik.port=80"
- "traefik.docker.network=web"
- "traefik.frontend.headers.SSLRedirect=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.browserXSSFilter=true"
- "traefik.frontend.headers.contentTypeNosniff=true"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.SSLHost=example.com"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
- "traefik.frontend.headers.frameDeny=true"
You should probably think about having the environment variables in a .env
file and import that where needed in the docker-compose.yaml
file. ;)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.