Closed shakeelosmani closed 2 years ago
Example compose file:
`version: 3.3
services:
app:
image: getfider/fider:stable
environment:
BASE_URL: https://sites.example.ameriave.com/dev-tools-feedback/v1
DATABASE_URL: postgres://fider:somepassword@db:5432/fider?sslmode=disable
JWT_SECRET: 'putsomerandomsecrethere'
networks:
- amc_overflow_v2
logging:
driver: json-file
deploy:
replicas: 2
labels:
traefik.docker.network: amc_overflow_v2
traefik.http.routers.dev-tools-feedback-service-v1.rule: Host(`sites.example.com`)
&& PathPrefix(`/dev-tools-feedback/v1`)
traefik.http.services.dev-tools-feedback-service-v1.loadbalancer.server.port: '3000'
swarmpit.service.deployment.autoredeploy: 'true'
db:
image: postgres:12
environment:
POSTGRES_PASSWORD: somepassword
POSTGRES_USER: fider
volumes:
- /var/fider/pg_data:/var/lib/postgresql/data
networks:
- amc_overflow_v2
logging:
driver: json-file
deploy:
placement:
constraints:
- node.labels.fider_db == true
networks:
amc_overflow_v2:
external: true`
It was user error!
Self hosted latest
Describe the bug Unable to make Fider work with Traefik proxy when running the site on subpath
To Reproduce Run Fider in a subpath
Expected behavior We should be able to run on a subpath
Additional context Traefik support:
After a quick look it seems that the main issue is Fider does not work well while under a sub path because it does some redirections and also hosts some static resources on its own ignoring any proxied path.
Evidence for that is the routing setup in the app. That means even when setting up a specific Path in Traefik for router matching only, then stripping it before sending to the backend with a middleware Fider itself will return a redirect to a root / path for example /signup which will not match the router rules and thus returning a 404.