#!/bin/sh | |
set -e | |
{ | |
domain=${SA_PUBLIC_DOMAIN_NAME:-miau.local} | |
live=/etc/nginx/certs/live | |
if [ ! -f ${live}/${domain}/privkey.pem ]; then | |
mkdir -p ${live}/${domain} | |
cp /etc/ssl/private/sa-selfsigned.key ${live}/${domain}/privkey.pem | |
cp /etc/ssl/certs/sa-selfsigned.crt ${live}/${domain}/fullchain.pem | |
cp /etc/ssl/certs/sa-selfsigned.crt ${live}/${domain}/chain.pem | |
cp /etc/ssl/certs/sa-selfsigned.crt ${live}/${domain}/cert.pem | |
fi | |
chmod -R go-w /etc/nginx/certs/live/ | |
} | |
exec /docker-entrypoint.sh "$@" |