-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support supplied cert/key pair supplied as env vars
- Loading branch information
Joel Wright
committed
Nov 1, 2023
1 parent
f5cf19e
commit 2dff8bb
Showing
4 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# base64 decode key/cert supplied in env vars | ||
if [ -n "${VESPA_CERT}" ]; then | ||
echo "${VESPA_CERT}" openssl base64 -A -d > "${VESPA_SECRETS_LOCATION}/cert.pem" | ||
else | ||
echo "No Vespa certificate supplied, skipping file creation" | ||
fi | ||
|
||
if [ -n "${VESPA_KEY}" ]; then | ||
echo "${VESPA_KEY}" openssl base64 -A -d > "${VESPA_SECRETS_LOCATION}/key.pem" | ||
else | ||
echo "No Vespa key supplied, skipping file creation" | ||
fi | ||
|
||
echo "Starting backend app" | ||
python3 app/main.py |