Set (sub)domain name via environment
diff --git a/nginx/Dockerfile.entrypoint b/nginx/Dockerfile.entrypoint
new file mode 100644
index 0000000..0c2ff96
--- /dev/null
+++ b/nginx/Dockerfile.entrypoint
@@ -0,0 +1,27 @@
+#!/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 "$@"