diff --git a/auth/readme.md b/auth/readme.md new file mode 100644 index 0000000..ef9673f --- /dev/null +++ b/auth/readme.md @@ -0,0 +1,3 @@ +This directory should contain your basic auth files. For each project you need to create a fil with the name of the project. +Add to the file your users and passwords. +you can generate a a user password combination with this site https://www.blitter.se/utils/basic-authentication-header-generator/ \ No newline at end of file diff --git a/certs/README.md b/certs/README.md index 12f86aa..cf95d22 100644 --- a/certs/README.md +++ b/certs/README.md @@ -2,5 +2,5 @@ Drop in directory for certificates. You can generate the necessary certs with: ``` shell -openssl req -x509 -newkey rsa:4096 -keyout certs/traefik.key -out certs/treafik.crt -days 365 +openssl req -x509 -newkey rsa:4096 -nodes -keyout certs/traefik.key -out certs/traefik.crt -days 365 ``` diff --git a/dktk-fed/docker-compose.yml b/dktk-fed/docker-compose.yml index c0b9434..6789161 100644 --- a/dktk-fed/docker-compose.yml +++ b/dktk-fed/docker-compose.yml @@ -9,14 +9,15 @@ services: - --entrypoints.web.address=:80 - --entrypoints.web-secure.address=:443 - --providers.docker=true - - --providers.file.directory=/etc/traefik/dynamic_conf + - --providers.file.directory=/configuration/ + - --providers.file.watch=true ports: - 80:80 - 443:443 - 8080:8080 volumes: - ../certs:/tools/certs - - ./traefik.yml:/etc/traefik/dynamic_conf/traefik.yml:ro + - ../tools/traefik/:/configuration/ - /var/run/docker.sock:/var/run/docker.sock:ro - ../auth/:/auth extra_hosts: @@ -31,6 +32,7 @@ services: - "traefik.enable=true" - "traefik.http.routers.landing.rule=PathPrefix(`/`)" - "traefik.http.services.landing.loadbalancer.server.port=80" + - "traefik.http.routers.landing.tls=true" blaze: image: "samply/blaze:0.15" diff --git a/tools/traefik/config.yml b/tools/traefik/config.yml new file mode 100644 index 0000000..bc536a5 --- /dev/null +++ b/tools/traefik/config.yml @@ -0,0 +1,5 @@ +# Specifying a certificate that will be used for matching requests +tls: + certificates: + - certFile: /tools/certs/traefik.crt + keyFile: /tools/certs/traefik.key \ No newline at end of file