mirror of
https://github.com/plankanban/planka.git
synced 2025-12-11 09:13:12 +03:00
Issue with Planka and Traefik. #706
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Zeropeace on GitHub.
Hi all,
I want to run Planka in docker container with Traefik as a reverse Proxy . But i have encountered a problem. If i route Planka thru Traefik i can only get to the Log In page and then after i log in it keeps loading for ever. This does not occur when i acces it with the IP:PORT combo. I have added my docker-compose and traefik config. I also found a cryptic log from Traefik wich might be useful.
@nickbe commented on GitHub:
I don't think anyone has ever tested Traefik. But anyway Traefik is supposed to detect the needed configuration as far as I know. If it doesn't (and I quote from its community) you're more than often fucked. There's simply not the time to experiment with non-standard proxy software. Sorry
@Underknowledge commented on GitHub:
Have been fighting this for a couple of hours now. apparently the planka container has issues with multiple networks
at some point I tryed to bindmount the
Unix socketinto the container, but theDATABASE_URLdidn't took this and always failed back to localhost, bummer..not working:
working:
Why this is the case, I really have no idea.
The only container that displayed this absurd behaviour was keycloak.
on a personal note,
@loranger cool trick with the collapsible code snippets, when I try it the shared code gets all wonky, care to share how you did this?
@johnchristopher commented on GitHub:
Here's an alternative: run Traefik in a container. It's easier to manage your services and network, no IP or port to configure on your host.
If you want I can dust off a pi and give you a running config for both Traefik and Planka.
The configuration you posted is a bit weird to me because I read some pihole and plank.my.domain in the same Traefik config but you can't run it on a local network in front of a pihole and on public server. What's your network setup ?
What it means is that your planka container's IP may change everytime you recreate the container:
Traefik can only read a container's labels when linked to the docker socket.
@shamoon commented on GitHub:
Yea as he said, in so many words, traefik is awesome when it just works but a little mysterious when it doesnt. I have it working in my setup FWIW (+ authelia), biggest difference is I use traefik docker labels which does the auto configuration magic, see below in case it helps you...
@loranger commented on GitHub:
I use traefik as a container, auto-discovering docker containers.
I also had this forever loading bug until I changed the
BASE_URLenvironment variable, matching the https (instead of http) traefik rule I defined in order to make planka reachable from outside.My conf is a little bit different, but in case it may help, here it is
.envdocker-compose.yml@loranger commented on GitHub:
5432is the PostgreSQL default port.It could be postgres which is not started, or incorrect credentials or connections not allowed from 192.168.0.2.
The latter should be the real issue because planka seems working fine with one network only.
I'm no specialist, but you should take a look at the postgresql conf (maybe pg_hba.conf file) use by default inside postgres:alpine image
Regarding the collapsible markup, you should take a look at the cheatsheet and then figure out your code was certainly messy because of the missing blank lines. Now you can use it as soon as you have too much lines to share. At least that's what I do ;)
@Underknowledge commented on GitHub:
I installed telnet inside of the app container and tried to reach the the PG database.
I think I was getting a
Connection refusedbut cant be certain anymore. The resolved IP was right, but even a nmap scan didn't showed a open PG port.But on the other side, the name resolution works. I thought the
POSTGRES_HOST_AUTH_METHODvar would work around this.Had like 15 edidts, but the yaml code-block just thew up on my tryes .
test title, ignore me
version: '3'
as per https://github.com/plankanban/planka/blob/master/docker-compose.yml
services:
planka:
image: meltyshev/planka:latest
command: >
bash -c
"for i in
seq 1 30; do./start.sh &&
s=
? && break || s=?;echo "Tried $$i times. Waiting 5 seconds...";
sleep 5;
done; (exit $$s)"
restart: unless-stopped
volumes:
- ${PROJECT_FOLDER}/user-avatars:/app/public/user-avatars
- ${PROJECT_FOLDER}/project-background-images:/app/public/project-background-images
- ${PROJECT_FOLDER}/attachments:/app/public/attachments
- ${PROJECT_FOLDER}/pg-run:/var/run/postgresql
env_file:
- ${PROJECT_FOLDER}/.env
ports:
- 3000:1337
postgres_planka:
image: postgres:alpine
container_name: postgres_planka
restart: unless-stopped
volumes:
- ${PROJECT_FOLDER}/db-data:/var/lib/postgresql/data
networks:
- traefik
expose: # no diffrence
- 5432
networks:
traefik:
name: traefik
external: true
edit: yea, still looks like ****
edit:
Didnt closed the shell window
@itobetter commented on GitHub:
hi guys i have the same error, my solution it was set the same BASE_URL as traefik.http.routers.server.rule traefik parameter, in others worlds
@PPC-Toolz commented on GitHub:
Hi, I do not use labels, but config.yaml and I faced the same problem
My default headers Middleware configuration
So my problem was related to - BASE_URL in docker-compose.yml
it should be https and someboard.yourdomain.com