Add domain keys as secrets
This commit is contained in:
parent
cf064bf0a4
commit
42d4e2c65d
8
sync.sh
8
sync.sh
|
|
@ -30,6 +30,14 @@ if [ ! -d /etc/sslmate/certs ]; then
|
||||||
mkdir -p /etc/sslmate/certs
|
mkdir -p /etc/sslmate/certs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# COPY secret keys to keys dir
|
||||||
|
# NOTE: /etc/sslmate needs to be a named volume so key is not stored in image
|
||||||
|
for FILE in /run/secrets/DOMAIN_*; do
|
||||||
|
FNAME=${FILE#*DOMAIN_}
|
||||||
|
FNAME=${FNAME,,}
|
||||||
|
cp "${FILE}" "/etc/sslmate/keys/${FNAME}"
|
||||||
|
done
|
||||||
|
|
||||||
if [ ! -f /etc/sslmate.conf ]; then
|
if [ ! -f /etc/sslmate.conf ]; then
|
||||||
cat > /etc/sslmate.conf <<EOF
|
cat > /etc/sslmate.conf <<EOF
|
||||||
api_key ${SSLMATE_API_KEY}
|
api_key ${SSLMATE_API_KEY}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue