D
Dokploy3mo ago
Manu

How to set basic auth when deploying composé

Hi, I’m deploying a service with a compose file from Gitlab repository. I set up a domain via the UI. How can I configure a basic auth on that domain ? Thanks.
8 Replies
Manu
ManuOP3mo ago
Someone to help please ?
Henrik
Henrik3mo ago
This guide should help you get going
Traefik BasicAuth Documentation - Traefik
The HTTP basic authentication (BasicAuth) middleware in Traefik Proxy restricts access to your Services to known users. Read the technical documentation.
Naegato_Momo's
Naegato_Momo's3mo ago
@Henrik,we can't do it with Compose; it only works when you create an application because services have random names. The question is—and I'm also asking—how can we add a middleware to Compose using its built-in functionality?
Henrik
Henrik3mo ago
Not possible using Dokploy functionality, but you can add the label yourself. When you click preview compose you'll see the name you have to use. I do it to secure applications using a OIDC provider
Henrik
Henrik3mo ago
Simple example
No description
Naegato_Momo's
Naegato_Momo's3mo ago
yes, but it's under version control and can't be easily redeploy without change it thanks for your response 🙏
Henrik
Henrik3mo ago
The name doesn't change as long as you don't create a new compose prosject. You can update and the deploy the same compose file as much as you want without chaning the label name
Henrik
Henrik3mo ago
I can update the project in the as much as I want. The name is decided here
No description

Did you find this page helpful?