Hello, I'm also interested to plug-in a Traefik as a reverse proxy for an OpenProject application
I tried to set Traefik's labels on both the proxy service and the web service of openproject 12 docker-compose definitions, but I'm only getting 499 errors in Traefik logs (tried ports 80, 8080, custom ... I don't get what I miss)
version:'3.7'configs:traefik.yml:file:./traefik.ymlservices:traefik:restart:unless-stoppedimage:traefik:2.9ports:-"80:80"-"443:443"labels:-"traefik.enable=true"-"traefik.http.routers.traefikApi.rule=Host(`traefik.domain.tld`)"-"traefik.http.routers.traefikApi.entryPoints=websecure"-"traefik.http.routers.traefikApi.service=api@internal"-"traefik.http.routers.traefikApi.middlewares=traefikApiBasicAuth"-"traefik.http.routers.traefikApi.tls=true"# "$" characters must be doubled in labels-"traefik.http.middlewares.traefikApiBasicAuth.basicauth.users=yourname:$$2y$$aaabbbcccddd"networks:-your_traefik_networkconfigs:-source:traefik.ymltarget:/etc/traefik/traefik.ymlvolumes:-/var/run/docker.sock:/var/run/docker.sock-./volumes/acme.json:/acme.jsonnetworks:your_traefik_network:external:true
Openproject v12 docker-compose.yml
services:# ....proxy:<<:[*image,*restart_policy]command:"./docker/prod/proxy"# You can comment/remove ports exposure, it's now handled by traefik# ports:# - "${PORT:-8080}:80"environment:APP_HOST:webOPENPROJECT_RAILS__RELATIVE__URL__ROOT:"${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"depends_on:-weblabels:-"traefik.enable=true"-"traefik.http.services.openproject.loadbalancer.server.port=80"-"traefik.http.routers.openproject.rule=Host(`yourdomain.tld`)"-"traefik.http.routers.openproject.entryPoints=websecure"-"traefik.http.routers.openproject.tls=true"-"traefik.http.routers.openproject.service=openproject"networks:-frontend# add it here-your_traefik_networknetworks:frontend:backend:# you must connect an external network (also present in the docker-compose/conf of Traefik)your_traefik_network:external:true
Happy openprojecting :)
Edit: forgot the "traefik.http.routers.openproject.service" line yesterday, added it this morning.
I also found out sometimes Traefik (or just docker ?) seems lost in the networking when the "web" service from OpenProject crashes at the first initialization - this is acutally in such case where I get 499 responses in Traefik. Just restart the proxy service: docker-compose restart proxy , and it should work.
Replies (4)
Hi, we suggest running apache2 or nginx as a docker container for proxiing OpenProject in docker.
Could you please share traefik repository and version which you are using?
Hello, I'm also interested to plug-in a Traefik as a reverse proxy for an OpenProject applicationI tried to set Traefik's labels on both the proxy service and the web service of openproject 12 docker-compose definitions, but I'm only getting 499 errors in Traefik logs (tried ports 80, 8080, custom ... I don't get what I miss)Using Traefik v2.9, no https for basic use caseNevermind, I had a typo in my domain name ....
It's working perfectly fine to set the labels on the proxy container :)
traefik.yml
Traefik docker-compose.yml
Openproject v12 docker-compose.yml
Happy openprojecting :)
Edit: forgot the "traefik.http.routers.openproject.service" line yesterday, added it this morning.
I also found out sometimes Traefik (or just docker ?) seems lost in the networking when the "web" service from OpenProject crashes at the first initialization - this is acutally in such case where I get 499 responses in Traefik. Just restart the proxy service: docker-compose restart proxy , and it should work.