From 03f3f5ed94c00bf8c17ac17bbdd846e9a923ec55 Mon Sep 17 00:00:00 2001 From: Patrick Skowronek Date: Thu, 24 Mar 2022 09:57:31 +0100 Subject: [PATCH 1/3] Added new script for user bridgehead --- configure-bridgehead.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 configure-bridgehead.sh diff --git a/configure-bridgehead.sh b/configure-bridgehead.sh new file mode 100644 index 0000000..e20dca9 --- /dev/null +++ b/configure-bridgehead.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +useradd --home-dir /srv/docker/bridgehead -g docker -N -u 317 -s /sbin/nologin \ No newline at end of file From 5bacdf02fb786a126899745490247c57e6d258e0 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 25 Mar 2022 10:41:15 +0100 Subject: [PATCH 2/3] Added user bridgehead and made changes to run bridghead as this user --- .gitignore | 8 ++- auth/dktk | 2 + dktk-fed/docker-compose.yml | 15 ++++-- landing/index.html | 64 +++++++++++++++++++++++ lib/generate.sh | 92 +++++++++++++++++++++------------ lib/setup-bridgehead-units.sh | 6 +-- lib/systemd/bridgehead@.service | 8 +-- 7 files changed, 152 insertions(+), 43 deletions(-) diff --git a/.gitignore b/.gitignore index 8960758..c7b00ec 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,10 @@ config/**/* !config/**/*.default docker-compose.override.yml site.conf - +.bash_logout +.bash_profile +.bashrc +.bash_history +.rnd +.pki/* +.viminfo \ No newline at end of file diff --git a/auth/dktk b/auth/dktk index e69de29..3bbeb89 100644 --- a/auth/dktk +++ b/auth/dktk @@ -0,0 +1,2 @@ +patrick:$2y$05$9tYlNuZEfCi1FrSUMYM0iOz8FEsHjg3QiPpr3ZfChL81rZ8IrZ0gK + diff --git a/dktk-fed/docker-compose.yml b/dktk-fed/docker-compose.yml index 92cc932..f9148b8 100644 --- a/dktk-fed/docker-compose.yml +++ b/dktk-fed/docker-compose.yml @@ -1,5 +1,4 @@ version: "3.7" - services: traefik: container_name: bridgehead_traefik @@ -7,13 +6,19 @@ services: command: - --api.insecure=true - --entrypoints.web.address=:80 - - --entrypoints.web-secure.address=:443 + - --entrypoints.websecure.address=:443 - --providers.docker=true + - --providers.file.directory=/configuration/ + - --entrypoints.web.http.redirections.entrypoint.to=websecure + - --entrypoints.web.http.redirections.entrypoint.scheme=https + - --providers.file.watch=true ports: - 80:80 - 443:443 - 8080:8080 volumes: + - ../certs:/tools/certs + - ../tools/traefik/:/configuration/ - /var/run/docker.sock:/var/run/docker.sock:ro - ../auth/:/auth extra_hosts: @@ -28,9 +33,10 @@ 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" + image: "samply/blaze:0.16" container_name: bridgehead_dktk_blaze environment: BASE_URL: "http://blaze:8080" @@ -46,7 +52,8 @@ services: - "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" # container_name: bridgehead_dktk_share diff --git a/landing/index.html b/landing/index.html index e69de29..c652299 100644 --- a/landing/index.html +++ b/landing/index.html @@ -0,0 +1,64 @@ + + + + + + + Bridgehead Overview + + + + + + + + + + @@ -68,19 +103,12 @@ cat > ../landing/index.html < - - Bridgehead - Reverse Proxy Traefik - - - DKTK - Blaze - + ${LOCAL_SERVICES} -