#!/bin/sh | |
set -e | |
{ | |
domain=${SA_PUBLIC_DOMAIN_NAME:-miau.local} | |
html=/var/www/html | |
rm -rf ${html} | |
cp -a /var/www/simpleid ${html} | |
for tmpl in /var/db/simpleid-templates/*.identity; do | |
ref=$(dirname ${tmpl})/$(basename ${tmpl} .identity) | |
name=$(basename ${ref}) | |
sed "s/miau.local/${domain}/" ${ref} >${html}/${name} | |
done | |
for f in /etc/nginx/conf.d/sa.conf; do | |
sed "s/miau.local/${domain}/" ${f}.template >${f} | |
done | |
} | |
chown -R nginx:nginx /var/www/html/ | |
chmod -R a-w /etc/nginx/conf.d/sa.conf /var/www/html/ | |
exec /docker-entrypoint.sh "$@" |