r/SpringBoot • u/Previous_Cod_4934 • Jan 10 '26
Question Help with Dokploy/Mattermost
Hi everyone,
I’m dealing with a Spring Boot issue that ONLY occurs when the app is deployed via Dokploy. Locally everything works perfectly and consistently.
Setup:
- Spring Boot backend
- Vue frontend
- Docker Compose
- Deployment via Dokploy
- Traefik as reverse proxy
- Single domain
- Frontend served at
/ - Backend served at
/apior/api/v1
IMPORTANT: 👉 This problem happens ONLY in the Dokploy deployment. 👉 Locally (without Dokploy, without Traefik, or using a dev proxy) everything works 100% reliably.
Problem:
- Locally all backend endpoints work every time.
- In Dokploy, some backend requests intermittently fail.
- The error is a Spring Boot JSON 404, e.g.:
{ "timestamp": "...", "status": 404, "error": "Not Found", "path": "/api/v1/admin/reminders/status" }
Key details:
- The 404 response clearly comes from Spring Boot (JSON), not from Traefik or the frontend.
- Some requests succeed, others fail (“flaky” behavior).
- Routing through Traefik appears correct, because requests do reach the backend.
- In production,
SPRING_PROFILES_ACTIVE=prodis set. - Locally the app runs without Dokploy (directly or via dev proxy).
Observations:
- The controller exists in the codebase.
- The endpoint works reliably locally.
In Dokploy:
- sometimes the same request returns 404
- sometimes it succeeds
Suspicions:
- Profile-specific behavior (
@Profile,@ConditionalOnProperty) - ComponentScan differences between environments
- Multiple backend containers running in Dokploy (old + new versions), with Traefik load-balancing between them
- Differences in context-path / servlet-path in
application-prod.yml - Edge cases with
/apivs/api/v1routing behind Traefik in Dokploy
Questions:
- Can Spring Boot return a 404 for an endpoint that exists in the code if the controller is not loaded due to profile or component-scan configuration?
- Has anyone experienced Dokploy + Traefik routing requests to multiple backend instances or different app versions?
- What is the fastest way to verify whether Dokploy is running multiple backend containers and Traefik is load-balancing between them?
- Are there known Dokploy- or Traefik-specific pitfalls when routing
/apior/api/v1?
Any hints or debugging strategies would be greatly appreciated. Thanks a lot!
