D
Dokploy3w ago
Jon

Domain no longer accessible on auto-deploy

I've got an express API server in dokploy, using a 'compose' service, and the docker-compose.yml has:
services:
api:
build:
context: .
dockerfile: Dockerfile
environment:
- PORT=3003
ports:
- "3003:3003"
networks:
- dokploy-network

networks:
dokploy-network:
external: true
services:
api:
build:
context: .
dockerfile: Dockerfile
environment:
- PORT=3003
ports:
- "3003:3003"
networks:
- dokploy-network

networks:
dokploy-network:
external: true
I have a domain configured which points to the service and port 3003. When I make a new commit to the repo this auto-deploys, and then I can no longer connect to it via the domain. HOWEVER, when I go back into domain, open it, save it (without any changes) and then redeploy, I can connect to the domain again. Is there something I need to add to my docker-compose.yml that dokploy is doing when setting the domain?
1 Reply
Jon
JonOP2w ago
For anyone who might stumble across this later, I fixed the issue by manually adding the appropriate labels in my docker-compose.yml: labels: - "traefik.enable=true" - "traefik.docker.network=dokploy-network" # HTTP → redirect to HTTPS - "traefik.http.routers.fchq-api-web.entrypoints=web" - "traefik.http.routers.fchq-api-web.rule=Host(api.fchq.io)" - "traefik.http.routers.fchq-api-web.middlewares=redirect-to-https@file" # HTTPS - "traefik.http.routers.fchq-api-websecure.entrypoints=websecure" - "traefik.http.routers.fchq-api-websecure.rule=Host(prodapi.fchq.io)" - "traefik.http.routers.fchq-api-websecure.tls.certresolver=letsencrypt" # point Traefik at your internal port - "traefik.http.services.fchq-api-web.loadbalancer.server.port=3003" - "traefik.http.services.fchq-api-websecure.loadbalancer.server.port=3003" Unfortunately this didn't turn out to be a long term solution, it's still bugging out. Is there something else I need to add to my config to ensure it can restart and auto-assign whatever black magic is happening in the background when I assign a domain?

Did you find this page helpful?