-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-server-block.conf
31 lines (27 loc) · 1.23 KB
/
nginx-server-block.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# nginx configuration used in Dockerfile
server {
listen 8080;
server_name localhost;
resolver 127.0.0.1;
location / {
root /app;
index index.html index.htm;
# Configure routing for Angular
try_files $uri $uri/ /index.html =404;
# Enable server-side includes to embed certain environment variables.
# Note that the env directive needs to be used beforehand: https://nginx.org/docs/ngx_core_module.html#env
ssi on;
set_by_lua_block $ENVIRONMENT_OUTLET {
return string.format(
"<script>var ENVIRONMENT = { FC_QUERY_URL: \"%s\", FC_KEYCLOAK_AUTH_URL: \"%s\", FC_KEYCLOAK_CLIENT_SCOPE: \"%s\", FC_KEYCLOAK_CLIENT_ID: \"%s\", FC_KEYCLOAK_CLIENT_SECRET: \"%s\", DEMO_USERNAME: \"%s\", DEMO_PASSWORD: \"%s\" };</script>",
os.getenv("FC_QUERY_URL") or "",
os.getenv("FC_KEYCLOAK_AUTH_URL") or "",
os.getenv("FC_KEYCLOAK_CLIENT_SCOPE") or "",
os.getenv("FC_KEYCLOAK_CLIENT_ID") or "",
os.getenv("FC_KEYCLOAK_CLIENT_SECRET") or "",
os.getenv("DEMO_USERNAME") or "",
os.getenv("DEMO_PASSWORD") or ""
)
}
}
}