How to set up remote staging environment with Traefik & Docker?

I have two working targets:
image
image

The remote docker target is run on Digital Ocean, using Traefik for SSL and connected to the domain succesfully.

I want to add a third environment to use as development, like a dev.website.com where I can push updates to and get test it remotely before deploying to production.

How do I do that?

I tried to create a new target in the Project Settings → Point to same docker machine → Set Web Server URL to dev.website.com.

But this broke the current production target, in Portainer I could see that things are trying to run on conflicting ports and I think that the root domain was getting routed to the staging docker container.

Community Page
Last updated: