cjerzak commited on
Commit
1ee79d8
·
verified ·
1 Parent(s): 45f0ce0

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +8 -2
entrypoint.sh CHANGED
@@ -1,11 +1,17 @@
1
  #!/usr/bin/env sh
2
  set -eu
3
 
4
- # Fail clearly if vars are missing
5
  : "${UPSTREAM_HOST:?UPSTREAM_HOST is required, e.g., cjerzak-policyview.hf.space}"
6
  : "${HF_TOKEN:?HF_TOKEN secret missing}"
7
 
8
- # Render to a writable location
 
 
 
 
 
 
 
9
  envsubst '${UPSTREAM_HOST} ${HF_TOKEN}' \
10
  < /app/nginx.conf.template > /tmp/nginx.conf
11
 
 
1
  #!/usr/bin/env sh
2
  set -eu
3
 
 
4
  : "${UPSTREAM_HOST:?UPSTREAM_HOST is required, e.g., cjerzak-policyview.hf.space}"
5
  : "${HF_TOKEN:?HF_TOKEN secret missing}"
6
 
7
+ # Writable temps for nginx
8
+ mkdir -p /tmp/nginx/client_temp \
9
+ /tmp/nginx/proxy_temp \
10
+ /tmp/nginx/fastcgi_temp \
11
+ /tmp/nginx/uwsgi_temp \
12
+ /tmp/nginx/scgi_temp
13
+
14
+ # Render config with secrets/vars
15
  envsubst '${UPSTREAM_HOST} ${HF_TOKEN}' \
16
  < /app/nginx.conf.template > /tmp/nginx.conf
17