A production ready1 docker-compose deployment of MLflow using Traefik with HTTP Basic Auth.
1 This project is provided as is, and without a warranty of any kind, see LICENSE for full details.
Install requirements:
- Apache Utils (provides
htpasswdcommand) - GNU gettext (provides
envsubstcommand)
sudo apt-get install -y apache2-utils gettextCreate a new .htpasswd file with a single user (using Bcrypt hashing):
htpasswd -cB config/.htpasswd <username>Add additional users with:
htpasswd -B config/.htpasswd <other_username>Create a .env in the root directory with the following variables completed:
# connection settings
DOMAIN_NAME=localhost
SERVICE_NAME=mlflow
SERVICE_PORT=5000
# tell the user where they are logging into
REALM=testsite
# required for letsencrypt certificate email updates
EMAIL_ADDRESS=example@example.comFinally write a traefik.yml config file using the .env variables:
./write_template.shStart all containers:
docker-compose up -d --buildMLflow is accessible on port 443 over HTTPS (port 80 redirects to 443). Use the username and password you created above to log in.