From 33dbb6ea478a347bd272afcb96036cfe3abd1259 Mon Sep 17 00:00:00 2001 From: William Petit Date: Fri, 25 Mar 2022 15:11:29 +0100 Subject: [PATCH] BaseURL configuration variable generalization --- Makefile | 4 ++- cmd/server/template/blocks/base.html.tmpl | 2 +- cmd/server/template/layouts/consent.html.tmpl | 2 +- cmd/server/template/layouts/login.html.tmpl | 2 +- internal/command/send_confirmation_email.go | 29 +++++-------------- internal/config/config.go | 7 ++--- internal/route/helper.go | 18 +++++++++++- internal/route/login.go | 25 +++++++++++----- misc/docker/Dockerfile | 2 +- 9 files changed, 51 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index 5285aa1..788b982 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ DOKKU_HOST := dokku@dev.lookingfora.name SHELL := /bin/bash DOCKER_IMAGE_NAME ?= bornholm/hydra-passwordless -DOCKER_IMAGE_TAG ?= latest +DOCKER_IMAGE_TAG ?= $(shell date +%Y%m%d%H%M) build: CGO_ENABLED=0 go build -v -o bin/server ./cmd/server @@ -85,8 +85,10 @@ docker-run: docker-release: docker-build docker image tag hydra-passwordless:latest $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG) + docker image tag hydra-passwordless:latest $(DOCKER_IMAGE_NAME):latest docker login docker push $(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG) + docker push $(DOCKER_IMAGE_NAME):latest clean: rm -rf release diff --git a/cmd/server/template/blocks/base.html.tmpl b/cmd/server/template/blocks/base.html.tmpl index 5efee57..dde7bae 100644 --- a/cmd/server/template/blocks/base.html.tmpl +++ b/cmd/server/template/blocks/base.html.tmpl @@ -7,7 +7,7 @@ {{block "title" . -}}{{- end}} {{- block "head_style" . -}} - + {{end}} {{- block "head_script" . -}}{{end}} diff --git a/cmd/server/template/layouts/consent.html.tmpl b/cmd/server/template/layouts/consent.html.tmpl index 0c86046..731a1e4 100644 --- a/cmd/server/template/layouts/consent.html.tmpl +++ b/cmd/server/template/layouts/consent.html.tmpl @@ -13,7 +13,7 @@ Autorisez vous l'application à utiliser ces informations vous concernant ?

-
+ {{range .RequestedScope}}