mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-17 06:00:14 +02:00
Adapt changes in teiler, exporter and reporter for CCP
This commit is contained in:
30
ccp/modules/exporter-auth-compose.yml
Normal file
30
ccp/modules/exporter-auth-compose.yml
Normal file
@ -0,0 +1,30 @@
|
||||
version: "3.7"
|
||||
|
||||
services:
|
||||
exporter:
|
||||
labels:
|
||||
# Main router
|
||||
- "traefik.http.routers.exporter_${PLATFORM}.priority=20"
|
||||
|
||||
# API router
|
||||
- "traefik.http.routers.exporter_${PLATFORM}_api.middlewares=exporter_${PLATFORM}_strip,exporter_auth"
|
||||
- "traefik.http.routers.exporter_${PLATFORM}_api.rule=PathRegexp(`/${PLATFORM}-exporter/.+`)"
|
||||
- "traefik.http.routers.exporter_${PLATFORM}_api.tls=true"
|
||||
- "traefik.http.routers.exporter_${PLATFORM}_api.priority=25"
|
||||
|
||||
# Shared middlewares
|
||||
- "traefik.http.middlewares.exporter_auth.basicauth.users=${EXPORTER_USER}"
|
||||
|
||||
reporter:
|
||||
labels:
|
||||
- "traefik.http.routers.reporter_${PLATFORM}.priority=20"
|
||||
|
||||
#- "traefik.http.routers.reporter_${PLATFORM}.middlewares=reporter_${PLATFORM}_strip,exporter_auth"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}_api.middlewares=reporter_${PLATFORM}_strip,exporter_auth"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}_api.rule=PathRegexp(`/${PLATFORM}-reporter/.+`)"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}_api.tls=true"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}_api.priority=25"
|
||||
#- "traefik.http.middlewares.reporter_auth.basicauth.users=${EXPORTER_USER}"
|
||||
|
||||
|
||||
|
@ -22,18 +22,7 @@ services:
|
||||
- "traefik.http.services.exporter_${PLATFORM}.loadbalancer.server.port=8092"
|
||||
- "traefik.http.routers.exporter_${PLATFORM}.tls=true"
|
||||
- "traefik.http.middlewares.exporter_${PLATFORM}_strip.stripprefix.prefixes=/${PLATFORM}-exporter"
|
||||
- "traefik.http.middlewares.exporter_auth.basicauth.users=${EXPORTER_USER}"
|
||||
#- "traefik.http.routers.exporter_${PLATFORM}.middlewares=exporter_${PLATFORM}_strip,exporter_auth"
|
||||
- "traefik.http.routers.exporter_${PLATFORM}.middlewares=exporter_${PLATFORM}_strip"
|
||||
- "traefik.http.routers.exporter_${PLATFORM}.priority=20"
|
||||
|
||||
- "traefik.http.routers.exporter_${PLATFORM}_api.rule=PathRegexp(`/${PLATFORM}-exporter/.+`)"
|
||||
- "traefik.http.routers.exporter_${PLATFORM}_api.tls=true"
|
||||
#- "traefik.http.middlewares.exporter_${PLATFORM}_api_strip.stripprefix.prefixes=/${PLATFORM}-exporter"
|
||||
#- "traefik.http.middlewares.exporter_api_auth.basicauth.users=${EXPORTER_USER}"
|
||||
- "traefik.http.routers.exporter_${PLATFORM}_api.middlewares=exporter_${PLATFORM}_strip,exporter_auth"
|
||||
#- "traefik.http.routers.exporter_${PLATFORM}_api.middlewares=exporter_auth"
|
||||
- "traefik.http.routers.exporter_${PLATFORM}_api.priority=25"
|
||||
volumes:
|
||||
- "/var/cache/bridgehead/${PLATFORM}/exporter-files:/app/exporter-files/output"
|
||||
|
||||
@ -74,15 +63,8 @@ services:
|
||||
- "traefik.http.routers.reporter_${PLATFORM}.rule=Path(`/${PLATFORM}-reporter`)"
|
||||
- "traefik.http.services.reporter_${PLATFORM}.loadbalancer.server.port=8095"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}.tls=true"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}.priority=20"
|
||||
- "traefik.http.middlewares.reporter_${PLATFORM}_strip.stripprefix.prefixes=/${PLATFORM}-reporter"
|
||||
#- "traefik.http.middlewares.reporter_auth.basicauth.users=${EXPORTER_USER}"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}.middlewares=reporter_${PLATFORM}_strip,exporter_auth"
|
||||
|
||||
- "traefik.http.routers.reporter_${PLATFORM}_api.rule=PathRegexp(`/${PLATFORM}-reporter/.+`)"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}_api.tls=true"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}_api.middlewares=reporter_${PLATFORM}_strip,exporter_auth"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}_api.priority=25"
|
||||
- "traefik.http.routers.reporter_${PLATFORM}.middlewares=reporter_${PLATFORM}_strip"
|
||||
|
||||
|
||||
# focus:
|
||||
|
@ -5,4 +5,7 @@ if [ "$ENABLE_EXPORTER" == true ]; then
|
||||
OVERRIDE+=" -f ./ccp/modules/exporter-compose.yml"
|
||||
EXPORTER_DB_PASSWORD="$(echo \"This is a salt string to generate one consistent password for the exporter. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
||||
EXPORTER_API_KEY="$(echo \"This is a salt string to generate one consistent API KEY for the exporter. It is not required to be secret.\" | sha1sum | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 64)"
|
||||
if [ "$EXPORTER_USER" == true ]; then
|
||||
OVERRIDE+=" -f ./ccp/modules/exporter-auth-compose.yml"
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user