From dbe054f592a43d164ad68535757a8722def8c379 Mon Sep 17 00:00:00 2001 From: Matthieu Lamalle Date: Thu, 2 Mar 2023 15:20:14 +0100 Subject: [PATCH 1/2] Ajout docker compose et certificats --- docker-compose.yml | 23 +++++++++++++++++++++++ misc/dokku/Dockerfile | 8 +++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5682019 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +version: "2.4" +services: + oidc-test: + build: + context: ./ + dockerfile: ./misc/dokku/Dockerfile + args: + - HTTP_PROXY=${HTTP_PROXY:-} + - HTTPS_PROXY=${HTTPS_PROXY:-} + - http_proxy=${http_proxy:-} + - https_proxy=${https_proxy:-} + environment: + - LOG_LEVEL=0 + - HTTP_ADDRESS=0.0.0.0:3002 + - OIDC_CLIENT_ID=local-test + - OIDC_CLIENT_SECRET=local-test + - OIDC_ISSUER_URL=https://msedev.crous-toulouse.fr/auth/ + - OIDC_REDIRECT_URL=http://localhost:3002 + - OIDC_POST_LOGOUT_REDIRECT_URL=http://localhost:3002 + ports: + - 3002:3002 + network_mode: host + diff --git a/misc/dokku/Dockerfile b/misc/dokku/Dockerfile index d7b2ccd..14179bf 100644 --- a/misc/dokku/Dockerfile +++ b/misc/dokku/Dockerfile @@ -13,12 +13,18 @@ WORKDIR /src RUN make ARCH_TARGETS=amd64 release +FROM alpine as certs + +RUN apk update && apk add ca-certificates + FROM busybox COPY --from=build /src/release/server-linux-amd64 /app +COPY --from=certs /etc/ssl/certs /etc/ssl/certs + WORKDIR /app ENV HTTP_ADDRESS=:80 -CMD ["bin/server", "-workdir", "/app", "-config", "server.yml"] \ No newline at end of file +CMD ["bin/server", "-workdir", "/app", "-config", "server.yml"] -- 2.17.1 From cf39e509b3ab674eefc6b0cf93751a64c8978368 Mon Sep 17 00:00:00 2001 From: Matthieu Lamalle Date: Thu, 2 Mar 2023 15:23:00 +0100 Subject: [PATCH 2/2] compose default vars --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5682019..f4d3dd3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: - HTTP_ADDRESS=0.0.0.0:3002 - OIDC_CLIENT_ID=local-test - OIDC_CLIENT_SECRET=local-test - - OIDC_ISSUER_URL=https://msedev.crous-toulouse.fr/auth/ + - OIDC_ISSUER_URL= - OIDC_REDIRECT_URL=http://localhost:3002 - OIDC_POST_LOGOUT_REDIRECT_URL=http://localhost:3002 ports: -- 2.17.1