aboutsummaryrefslogtreecommitdiffstats
path: root/services/nginx/fs/sbin/cmd.bash
blob: e024b4f1904e10d3609f1f73f236b0d2d681c86b (plain)
1
2
3
4
5
6
7
8
9
10
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;"