File tree Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Original file line number Diff line number Diff line change 22
33set -eo pipefail
44
5- OAUTH2_PROXY_VERSION=" ${OAUTH2_PROXY_VERSION:= v7.3 .0} "
6- OAUTH2_PROXY_CHECKSUM=" 5ebeaa616e22d941e2e4917879b81c25469546f339adafc2411f58c41ea5d151 "
5+ OAUTH2_PROXY_VERSION=" ${OAUTH2_PROXY_VERSION:= v7.6 .0} "
6+ OAUTH2_PROXY_CHECKSUM=" 5e2f84ded61074b5f33eeef2c9f6d2d94294bcc9f9802e78921f02189ece0988 "
77
88BP_DIR=" $( cd $( dirname " $0 " ) ; pwd) "
99BUILD_DIR=" $1 "
@@ -16,9 +16,11 @@ mkdir -p "$BUILD_DIR/bin"
1616
1717echo " downloading oauth2-proxy..."
1818wget --no-verbose " https://github.com/oauth2-proxy/oauth2-proxy/releases/download/${OAUTH2_PROXY_VERSION} /oauth2-proxy-${OAUTH2_PROXY_VERSION} .linux-amd64.tar.gz" -O $tmp_dir /oauth2-proxy.tar.gz
19+
20+ echo " $OAUTH2_PROXY_CHECKSUM $tmp_dir /oauth2-proxy.tar.gz" | sha256sum -c -
21+
1922tar -xzf $tmp_dir /oauth2-proxy.tar.gz -C " $BUILD_DIR /bin" --strip-components=1
2023
21- echo " $OAUTH2_PROXY_CHECKSUM $BUILD_DIR /bin/oauth2-proxy" | sha256sum -c -
2224
2325
2426
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ cd " $( dirname " $0 " ) "
6+
7+ if [ -z ${PORT+x} ]; then echo " please set PORT" ; exit 1; fi
8+ if [ -z ${OAUTH2_PROXY_PROVIDER+x} ]; then echo " please set OAUTH2_PROXY_PROVIDER" ; exit 1; fi
9+ if [ -z ${OAUTH2_PROXY_CLIENT_ID+x} ]; then echo " please set OAUTH2_PROXY_CLIENT_ID" ; exit 1; fi
10+ if [ -z ${OAUTH2_PROXY_CLIENT_SECRET+x} ]; then echo " please set OAUTH2_PROXY_CLIENT_SECRET" ; exit 1; fi
11+ if [ -z ${OAUTH2_PROXY_COOKIE_SECRET+x} ]; then echo " please set OAUTH2_PROXY_COOKIE_SECRET" ; exit 1; fi
12+
13+ OAUTH2_PROXY_SET_XAUTHREQUEST=" ${OAUTH2_PROXY_SET_XAUTHREQUEST:- true} "
14+ export OAUTH2_PROXY_SET_XAUTHREQUEST
15+
16+ OAUTH2_PROXY_PASS_ACCESS_TOKEN=" ${OAUTH2_PROXY_PASS_ACCESS_TOKEN:- true} "
17+ export OAUTH2_PROXY_PASS_ACCESS_TOKEN
18+
19+ OAUTH2_PROXY_HTTP_ADDRESS=" ${OAUTH2_PROXY_HTTP_ADDRESS:- http://: $PORT } "
20+ export OAUTH2_PROXY_HTTP_ADDRESS
21+
22+ if [ -n " ${OAUTH2_EMAIL_DOMAIN} " ]; then
23+ OAUTH2_PROXY_EMAIL_DOMAINS=" ${OAUTH2_EMAIL_DOMAIN} "
24+ else
25+ OAUTH2_PROXY_EMAIL_DOMAINS=" *"
26+ fi
27+ export OAUTH2_PROXY_EMAIL_DOMAINS
28+
29+ if [ -n " ${OAUTH2_GITHUB_ORG} " ]; then
30+ OAUTH2_PROXY_GITHUB_ORG=" ${OAUTH2_GITHUB_ORG} "
31+ export OAUTH2_PROXY_GITHUB_ORG
32+ fi
33+
34+ echo " starting oauth2-proxy..."
35+ exec ./oauth2-proxy --upstream file:///app/dist/# /
You can’t perform that action at this time.
0 commit comments