aboutsummaryrefslogtreecommitdiffstats
path: root/services/nginx/sbin/cmd.bash
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-02-12 21:24:22 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-02-13 01:57:39 +0100
commit3561b6d86c329272b1825adaf3ca49c9aff76119 (patch)
treefb8bd4148a7ddca115878b96326a6d6c96c6776f /services/nginx/sbin/cmd.bash
parent6c22a6e48e8ff49a69434eca7a7b78158576cb7b (diff)
downloadnet_services-3561b6d86c329272b1825adaf3ca49c9aff76119.tar.gz
net_services-3561b6d86c329272b1825adaf3ca49c9aff76119.zip
Refactor
- Remove cgit files; pull cgit image from Docker Hub instead of building locally - Tidy up file hierarchy - Minor fixes and edits
Diffstat (limited to 'services/nginx/sbin/cmd.bash')
-rwxr-xr-xservices/nginx/sbin/cmd.bash11
1 files changed, 11 insertions, 0 deletions
diff --git a/services/nginx/sbin/cmd.bash b/services/nginx/sbin/cmd.bash
new file mode 100755
index 0000000..e024b4f
--- /dev/null
+++ b/services/nginx/sbin/cmd.bash
@@ -0,0 +1,11 @@
+#!/usr/bin/bash
+set -eu
+
+# Install sensitive data in tmpfs
+install --mode 400 /run/host_secrets/server.crt /run/secrets/server.crt
+install --mode 400 /run/host_secrets/server.key /run/secrets/server.key
+
+# We have to run the entrypoint again
+# Because if the first positional parameter is not "nginx" or "nginx-debug" the scripts in /docker-entrypoint.d are not ran.
+# https://github.com/nginx/docker-nginx/blob/master/stable/debian/docker-entrypoint.sh
+exec /docker-entrypoint.sh nginx -g "daemon off;"