Skip to content

Commit

Permalink
fix(nginx): fix nginx.conf generation
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jul 11, 2024
1 parent 7287be6 commit 518dfbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nginx/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn setup() -> Result<String, Error> {
.with_exec(vec!["[ -f ../nginx.template ] || wget https://raw.githubusercontent.com/fluentci-io/services/main/nginx/nginx.template -O ../nginx.template"])?
.with_exec(vec!["[ -f fastcgi.conf ] || wget https://raw.githubusercontent.com/fluentci-io/services/main/nginx/fastcgi.conf"])?
.with_exec(vec!["[ -f ../index.html ] || wget https://raw.githubusercontent.com/fluentci-io/services/main/nginx/web/index.html -O ../index.html"])?
.with_exec(vec![r#"if [ -f ../nginx.template ]; then envsubst $(awk 'BEGIN {for (k in ENVIRON) {printf "$"k","}}') < ../nginx.template > nginx.conf; fi"#])?
.with_exec(vec!["[ -f ../nginx.template ] && envsubst < ../nginx.template > nginx.conf"])?
.with_exec(vec![
"grep -q nginx Procfile || echo 'nginx: nginx -p $PWD -c $PWD/nginx.conf -e error.log -g \"pid nginx.pid;daemon off;\"' >> Procfile",
])?
Expand Down

0 comments on commit 518dfbd

Please sign in to comment.