Utilisation d'un serveur Go custom pour le backend au lieu de
super-graph Malheureusement, super-graph n'a pas tenu les promesses qu'il semblait annoncer. Je propose donc de basculer sur un serveur Go classique (via goweb). L'authentification OpenID Connect étant gérée côté backend et non plus côté frontend.
This commit is contained in:
@ -1,9 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
hydra clients create \
|
||||
--id daddy \
|
||||
--secret daddycool \
|
||||
-n Daddy \
|
||||
-a email,email_verified,offline_access,openid \
|
||||
--token-endpoint-auth-method none \
|
||||
--post-logout-callbacks http://localhost:8081 \
|
||||
-a email,email_verified,openid \
|
||||
--token-endpoint-auth-method client_secret_post \
|
||||
--post-logout-callbacks http://localhost:8081/logout/redirect \
|
||||
-c http://localhost:8081/oauth2/callback
|
@ -1,36 +0,0 @@
|
||||
FROM alpine:edge AS build
|
||||
|
||||
ARG HTTP_PROXY=
|
||||
ARG HTTPS_PROXY=
|
||||
ARG http_proxy=
|
||||
ARG https_proxy=
|
||||
|
||||
ARG SUPERGRAPH_VERSION=88ba105b70c60b2c7467dc1f76f041cec2614a04
|
||||
ARG WAITFORIT_VERSION=v2.4.1
|
||||
|
||||
RUN apk add --no-cache go make git curl bash ca-certificates
|
||||
|
||||
RUN git clone https://forge.cadoles.com/wpetit/super-graph.git \
|
||||
&& export PATH="$PATH:/root/go/bin" \
|
||||
&& export CGO_ENABLED=0 \
|
||||
&& cd super-graph \
|
||||
&& git checkout ${SUPERGRAPH_VERSION} \
|
||||
&& make SHELL='bash -x' build
|
||||
|
||||
RUN curl -sL \
|
||||
-o /usr/local/bin/waitforit \
|
||||
https://github.com/maxcnunes/waitforit/releases/download/${WAITFORIT_VERSION}/waitforit-linux_amd64
|
||||
|
||||
FROM alpine:3.11
|
||||
|
||||
COPY --from=build /super-graph/super-graph /usr/local/bin/super-graph
|
||||
COPY --from=build /usr/local/bin/waitforit /usr/local/bin/waitforit
|
||||
|
||||
RUN chmod +x /usr/local/bin/waitforit
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint
|
||||
|
||||
CMD ["/usr/local/bin/docker-entrypoint"]
|
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
if [ ! -f /container-lifecycle/first_run ]; then
|
||||
waitforit -debug -host $SG_DATABASE_HOST -port 5432
|
||||
super-graph db:migrate up
|
||||
super-graph db:seed
|
||||
mkdir /container-lifecycle
|
||||
touch /container-lifecycle/first_run
|
||||
fi
|
||||
|
||||
super-graph serv
|
Reference in New Issue
Block a user