Browse Source

Ajout de 'nginx-entrypoint.sh'

penta 4 days ago
parent
commit
82daffad3a
1 changed files with 13 additions and 0 deletions
  1. 13 0
      nginx-entrypoint.sh

+ 13 - 0
nginx-entrypoint.sh

@@ -0,0 +1,13 @@
+set -Eeuo pipefail
+
+AUTH_USER="${SELKIES_BASIC_AUTH_USER:-${USER:-ubuntu}}"
+AUTH_PASSWORD="${SELKIES_BASIC_AUTH_PASSWORD:-${PASSWD:-mypasswd}}"
+
+htpasswd -bcm \
+    /tmp/selkies.htpasswd \
+    "${AUTH_USER}" \
+    "${AUTH_PASSWORD}"
+
+exec /usr/sbin/nginx \
+    -c /etc/nginx/nginx.conf \
+    -g "daemon off;"