-
First Check
Commit to Help
Example Code
DescriptionFollowing the template instructions, I successfully deployed 2 environments (staging and production) on the same VPS and on the same public traefik network :
I would like to add simple auth when user try to access a I tried to add a basic auth Note: I went for basic auth because it look like a simple solution, but I'm open to other approach. Operating SystemLinux Operating System Details
Python Version3.10.13 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I am not using this template but have you tried to adapt the As far as I've looked all the docker compose files, this must be it. How have you setup your two domains? You should have two directories, each with a copy of this template and configured. Furthermore, your dns should be able to resolve both domains.
As a side note, to ease up migration to later versions of this template, you should only adapt docker-compose.override.yml. |
Beta Was this translation helpful? Give feedback.
-
On the same VPS I have indeed two copies of the template. Both are updated with its own github runner. As you suggest, I use the
No, I did not update See bellow deploy to production workflow (there is a similar one for staging but with
At this stage, I have the 2 environments ( Both environments run behind the same Traefik proxy as described in this template documentation To prevent the end user from accessing staging, my hunch was to add at proxy level a basic authentication on the staging subdomain a. Something similar to what is done here for the default traefik dashboard (secured by middlewares=admin-auth) So I tried unsuccessfully to update docker-compose.traefik.yml. But I'm a beginner with traefik and I can't find a solution. Translated with DeepL.com (free version) |
Beta Was this translation helpful? Give feedback.
-
Some answers about how the template works
When I'm deploying in staging I running this workflow :
There is a similar workflow for production Working implementation of basic oauthI found a simple way to implement basic oauth on staging : I create a new New file: docker-compose.staging.yml
updating .github/workflows/deploy-staging.yml
|
Beta Was this translation helpful? Give feedback.
Some answers about how the template works
docker-compose.override.yaml
is only used for development purpose when runningdocker compose watch
When I'm deploying in staging I running this workflow :
There is a similar workflow for production
Working implementation of basic oauth
I found a simple way to implement basic oauth on staging :
I create a new
docker-compose.staging.yml
to overidedocker-compose.yml
during staging deployment workflow:New file: docker-compose.staging.yml