forked from hcengineering/huly-selfhost
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.sh
More file actions
executable file
·24 lines (19 loc) · 712 Bytes
/
Copy pathnginx.sh
File metadata and controls
executable file
·24 lines (19 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
set -euo pipefail
CONFIG_FILE="${CONFIG_FILE:-huly_v7.conf}"
if [[ ! -f "$CONFIG_FILE" ]]; then
echo "Missing $CONFIG_FILE. Run ./setup.sh first." >&2
exit 1
fi
set -a
# shellcheck disable=SC1090
source "$CONFIG_FILE"
set +a
: "${HOST_ADDRESS:?HOST_ADDRESS is required}"
: "${SSL_CERTIFICATE:?SSL_CERTIFICATE is required}"
: "${SSL_CERTIFICATE_KEY:?SSL_CERTIFICATE_KEY is required}"
HTTP_PORT="${HTTP_PORT:-8087}"
export HTTP_PORT
# Print a host Nginx vhost. Install and reload it explicitly on the host;
# deployment must not depend on a separate gateway container or network.
envsubst '${HOST_ADDRESS} ${SSL_CERTIFICATE} ${SSL_CERTIFICATE_KEY} ${HTTP_PORT}' < .template.nginx.conf