-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.conf
74 lines (61 loc) · 1.98 KB
/
nginx.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Taken from the default nginx config in our base image
# See "Customize configuration" on https://hub.docker.com/_/nginx
pid /tmp/nginx.pid;
worker_processes auto;
events {
worker_connections 1024;
}
# Send anything from info to errors to stdout for logging
error_log /dev/stdout info;
# Run in the foreground
daemon off;
http {
# Taken from the default nginx config in our base image
# See "Customize configuration" on https://hub.docker.com/_/nginx
proxy_temp_path /tmp/proxy_temp;
client_body_temp_path /tmp/client_temp;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
keepalive_timeout 65;
gzip on;
# Send access logs to stdout for logging
access_log /dev/stdout main;
# Custom server blocks to serve auth and export frames on separate ports.
# Maintain recovery and auth separately for now for backwards-compatibility.
# Prod
server {
listen 8080;
root /usr/share/nginx/auth;
# Health endpoint for k8s
location = /health {
access_log off;
add_header 'Content-Type' 'application/json';
return 200 '{"status":"UP"}';
}
}
server {
listen 8081;
root /usr/share/nginx;
location / {
try_files /export/$uri /templated/export/$uri /templated/export/$uri/index.html =404;
}
}
server {
listen 8082;
root /usr/share/nginx/recovery;
}
server {
listen 8083;
root /usr/share/nginx;
location / {
try_files /import/$uri /templated/import/$uri /templated/import/$uri/index.html =404;
}
}
}