Moved traefik dashboard to https and finished add user script

This commit is contained in:
root 2022-04-12 08:44:10 +02:00
parent fe0e1ce5d2
commit c929da51b3
3 changed files with 13 additions and 9 deletions

View File

@ -5,22 +5,26 @@ services:
container_name: bridgehead_traefik container_name: bridgehead_traefik
image: traefik:2.4 image: traefik:2.4
command: command:
- --api.insecure=true
- --entrypoints.web.address=:80 - --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443 - --entrypoints.websecure.address=:443
- --providers.docker=true - --providers.docker=true
- --providers.file.watch=true - --api.dashboard=true
- --accesslog=true # print access-logs
- --entrypoints.web.http.redirections.entrypoint.to=websecure - --entrypoints.web.http.redirections.entrypoint.to=websecure
- --entrypoints.web.http.redirections.entrypoint.scheme=https - --entrypoints.web.http.redirections.entrypoint.scheme=https
labels:
- "traefik.http.routers.dashboard.rule=PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
- "traefik.http.routers.dashboard.entrypoints=websecure"
- "traefik.http.routers.dashboard.service=api@internal"
- "traefik.http.routers.dashboard.tls=true"
- "traefik.http.routers.dashboard.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=${bc_auth_users}"
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
- 8080:8080
volumes: volumes:
- ../certs:/tools/certs - ../certs:/tools/certs
- ../tools/traefik/:/configuration/
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
- ../auth/:/auth
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"

View File

@ -3,7 +3,7 @@
echo "This script add's a user with password to the bridghead" echo "This script add's a user with password to the bridghead"
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
echo "No arguments provided, please provide the prject name" echo "No arguments provided, please provide the project name"
exit 1 exit 1
fi fi

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
cat > ../landing/index.html <<EOL cat > ./landing/index.html <<EOL
<html lang="en"> <html lang="en">
<head> <head>
@ -70,11 +70,11 @@ cat > ../landing/index.html <<EOL
<tbody> <tbody>
<tr> <tr>
<td>Bridgehead</td> <td>Bridgehead</td>
<td>Reverse Proxy <a href="http://e260-serv-05:8080/">Traefik</a></td> <td>Reverse Proxy <a href="https://e260-serv-05/dashboard/">Traefik</a></td>
</tr> </tr>
<tr> <tr>
<td>DKTK</td> <td>DKTK</td>
<td><a href="http://e260-serv-05/dktk-localdatamanagement/fhir/">Blaze</a></td> <td><a href="https://e260-serv-05/dktk-localdatamanagement/fhir/">Blaze</a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>