31 lines
737 B
Markdown
31 lines
737 B
Markdown
Générer les fichiers pour le certificat .localhost :
|
|
|
|
````shell
|
|
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
|
|
-keyout ./certs/localhost.key -out ./certs/localhost.crt \
|
|
-subj "/CN=*.localhost"
|
|
````
|
|
|
|
Vous pouvez aussi utiliser mkcert:
|
|
|
|
````shell
|
|
sudo apt install libnss3-tools
|
|
sudo apt install mkcert
|
|
mkcert -install
|
|
mkcert -cert-file certs/localhost.crt -key-file certs/localhost.key "*.localhost"
|
|
````
|
|
|
|
Créer le réseau frontend :
|
|
````shell
|
|
docker network create frontend
|
|
````
|
|
|
|
Pour générer le htpasswd nécessaire pour le dashboard de Traefik :
|
|
|
|
````shell
|
|
sudo apt install apache2-utils
|
|
htpasswd -nb username "password" | sed -e 's/\$/\$\$/g'
|
|
````
|
|
|
|
Remplacer la valeur obtenue dans le fichier .env (TRAEFIK_HTPASSWD).
|