Add support for CLIENT-ID, CLIENT-SECRET, and OAUTH-PRIVATE-TOKEN environment variables
All checks were successful
Publish Twitch Archive Container / publish (push) Successful in 1m29s
All checks were successful
Publish Twitch Archive Container / publish (push) Successful in 1m29s
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
9d5c707646
commit
4083fb4d78
2 changed files with 30 additions and 0 deletions
|
|
@ -9,6 +9,15 @@ services:
|
|||
TZ: ${TZ:-UTC}
|
||||
RCLONE_CONFIG: ${TWITCH_ARCHIVE_RCLONE_CONFIG:-/app/config/rclone.conf}
|
||||
TWITCH_ARCHIVE_HEALTHCHECK_STREAMER: ${TWITCH_ARCHIVE_HEALTHCHECK_STREAMER:-vinesauce}
|
||||
CLIENT_ID: ${CLIENT_ID:-}
|
||||
CLIENT_SECRET: ${CLIENT_SECRET:-}
|
||||
OAUTH_PRIVATE_TOKEN: ${OAUTH_PRIVATE_TOKEN:-}
|
||||
SENDER: ${SENDER:-}
|
||||
RECEIVER: ${RECEIVER:-}
|
||||
PASSWD: ${PASSWD:-}
|
||||
"CLIENT-ID":
|
||||
"CLIENT-SECRET":
|
||||
"OAUTH-PRIVATE-TOKEN":
|
||||
command:
|
||||
- sh
|
||||
- -lc
|
||||
|
|
|
|||
|
|
@ -3,4 +3,25 @@ set -eu
|
|||
|
||||
mkdir -p /app/archive /app/config /app/bin/temp
|
||||
|
||||
if [ -z "${CLIENT_ID:-}" ]; then
|
||||
client_id_from_hyphenated="$(printenv 'CLIENT-ID' 2>/dev/null || true)"
|
||||
if [ -n "$client_id_from_hyphenated" ]; then
|
||||
export CLIENT_ID="$client_id_from_hyphenated"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "${CLIENT_SECRET:-}" ]; then
|
||||
client_secret_from_hyphenated="$(printenv 'CLIENT-SECRET' 2>/dev/null || true)"
|
||||
if [ -n "$client_secret_from_hyphenated" ]; then
|
||||
export CLIENT_SECRET="$client_secret_from_hyphenated"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "${OAUTH_PRIVATE_TOKEN:-}" ]; then
|
||||
oauth_token_from_hyphenated="$(printenv 'OAUTH-PRIVATE-TOKEN' 2>/dev/null || true)"
|
||||
if [ -n "$oauth_token_from_hyphenated" ]; then
|
||||
export OAUTH_PRIVATE_TOKEN="$oauth_token_from_hyphenated"
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue