diff --git a/README.md b/README.md index 7745b47..48a794c 100644 --- a/README.md +++ b/README.md @@ -286,9 +286,8 @@ It is not recommended to use this script in production! ### Basic Auth -Some services we use authfication to protect the data. For example for local data managemnt like the blaze. +use add_user.sh -The /auth direcotry contians for each project a file with user and password combination. If it is not present please create a file with just the project name. To add a combination use [htpasswdgenerator](https://htpasswdgenerator.de/) or use htpasswd on your maschine. ### HTTPS Access diff --git a/dktk-fed/docker-compose.yml b/dktk-fed/docker-compose.yml index a471b33..04458de 100644 --- a/dktk-fed/docker-compose.yml +++ b/dktk-fed/docker-compose.yml @@ -9,10 +9,9 @@ services: - --entrypoints.web.address=:80 - --entrypoints.websecure.address=:443 - --providers.docker=true - - --providers.file.directory=/configuration/ + - --providers.file.watch=true - --entrypoints.web.http.redirections.entrypoint.to=websecure - --entrypoints.web.http.redirections.entrypoint.scheme=https - - --providers.file.watch=true ports: - 80:80 - 443:443 @@ -48,12 +47,13 @@ services: - "blaze-data:/app/data" labels: - "traefik.enable=true" - - "traefik.http.middlewares.test-auth.basicauth.usersfile=/auth/dktk" + - "traefik.http.middlewares.test-auth.basicauth.users=${bc_auth_users}" - "traefik.http.routers.blaze_dktk.rule=PathPrefix(`/dktk-localdatamanagement`)" - "traefik.http.middlewares.dktk_b_strip.stripprefix.prefixes=/dktk-localdatamanagement" - "traefik.http.services.blaze_dktk.loadbalancer.server.port=8080" - "traefik.http.routers.blaze_dktk.middlewares=dktk_b_strip,test-auth" - "traefik.http.routers.blaze_dktk.tls=true" + # dktk-fed-search-share: # image: "ghcr.io/samply/dktk-fed-search-share:pr-1" diff --git a/lib/add_bc_user.sh b/lib/add_bc_user.sh index a7442be..3034c0a 100755 --- a/lib/add_bc_user.sh +++ b/lib/add_bc_user.sh @@ -9,10 +9,7 @@ echo bc=$(docker run --rm -ti xmartlabs/htpasswd $bc_user $bc_password) if [ -z $bc_auth_users ]; then - export bc_auth_users=$bc - echo $bc_auth_users + printf "Please run: export bc_auth_users=\"%q\"" $bc else - export bc_auth_users="$bc_auth_users,$bc" - echo $bc_auth_users -fi - + echo "Please run: export bc_auth_users=\"${bc},$bc_auth_users\"" +fi \ No newline at end of file diff --git a/lib/prerequisites.sh b/lib/prerequisites.sh index 05a4c59..65ec9e6 100755 --- a/lib/prerequisites.sh +++ b/lib/prerequisites.sh @@ -4,7 +4,7 @@ ## Check if user is a su echo "Welcome to the starting a bridgehead. We will get your instance up and running in no time" echo "First we will check if all prerequisites are met ..." -prerequisites="git docker docker-compose cat" +prerequisites="git docker docker-compose" for prerequisite in $prerequisites; do $prerequisite --version 2>&1 is_available=$?