Last active
March 16, 2026 19:16
-
-
Save hgirish/70d101de830a56410035df6e5b67ed02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -e | |
| # Substitute environment variables into nginx.conf | |
| envsubst '${PRIMARY_DOMAIN} ${ALIAS_DOMAINS}' \ | |
| < /etc/nginx/conf.d/nginx.conf.template \ | |
| > /etc/nginx/conf.d/default.conf | |
| nginx -g "daemon off;" | |
| DEV | |
| PRIMARY_DOMAIN=dev-primary-domain.com | |
| ALIAS_DOMAINS="dev-alias1.com dev-alias2.com" | |
| PROD | |
| PRIMARY_DOMAIN=prod-primary-domain.com | |
| ALIAS_DOMAINS="prod-alias1.com prod-alias2.com" | |
| QA | |
| PRIMARY_DOMAIN=qa-primary-domain.com | |
| ALIAS_DOMAINS="qa-alias1.com qa-alias2.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment