Skip to content

infra: template nginx configuration file - #219

Open
karlatec wants to merge 2 commits into
spdk:mainfrom
karlatec:karlatec/infra-nginx-template
Open

karlatec wants to merge 2 commits into
spdk:mainfrom
karlatec:karlatec/infra-nginx-template

Conversation

@karlatec

Copy link
Copy Markdown
Contributor

ssl_certificate and ssl_certificate_key paths in nginx
configuration file are quite probably not "localhost"
when running things in production and will be using
the actual domain's directory.

Use .env.nginx and envsubst to create a config file
with ssl options potining to correct directory.

karlatec added 2 commits July 16, 2026 10:22
Signed-off-by: Karol Latecki <karol.latecki@nutanix.com>
ssl_certificate and ssl_certificate_key paths in nginx
configuration file are quite probably not "localhost"
when running things in production and will be using
the actual domain's directory.

Use .env.nginx and envsubst to create a config file
with ssl options potining to correct directory.

Signed-off-by: Karol Latecki <karol.latecki@nutanix.com>
Comment thread infra/docker-compose.yaml
- /bin/bash
- -c
- |
envsubst '$${NGINX_SSL_DOMAIN_NAME}' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably would've ended up eval ing it instead (or just seding).

eval "cat <<-SUBST
$(< template)
SUBST
" >conf

TIL envsubst exists. In any case, LGTM.

@mikeBashStuff mikeBashStuff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants