diff --git a/traefik/hooks/web_proxy-relation-joined b/traefik/hooks/web_proxy-relation-joined new file mode 100755 index 0000000..40a8c3a --- /dev/null +++ b/traefik/hooks/web_proxy-relation-joined @@ -0,0 +1,12 @@ +#!/bin/bash + +## Should be executable N time in a row with same result. + +set -e + +config-add " +services: + $MASTER_BASE_CHARM_NAME: + labels: + - 'traefik.frontend.rule=Host:$(relation-get domain)' +" diff --git a/traefik/metadata.yml b/traefik/metadata.yml new file mode 100644 index 0000000..ca7544c --- /dev/null +++ b/traefik/metadata.yml @@ -0,0 +1,12 @@ +description: "Traefik" +maintainer: "Valentin Lab " +## XXXvlab: docker uses the 'build' directory or the 'image:' option here. +docker-image: traefik +docker-compose: + restart: unless-stopped + command: --api --docker ## Enables the web UI and tells Træfik to listen to docker + ports: + - "80:80" ## The HTTP port + - "8080:8080" ## The Web UI (enabled by --api) +host-resources: + - /var/run/docker.sock ## So that Traefik can listen to the Docker events diff --git a/whoami/metadata.yml b/whoami/metadata.yml new file mode 100644 index 0000000..186b7e5 --- /dev/null +++ b/whoami/metadata.yml @@ -0,0 +1,4 @@ +description: "Whoami" +maintainer: "Valentin Lab " +## XXXvlab: docker uses the 'build' directory or the 'image:' option here. +docker-image: emilevauge/whoami