-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathnginx-docker.conf
More file actions
56 lines (48 loc) · 1.39 KB
/
nginx-docker.conf
File metadata and controls
56 lines (48 loc) · 1.39 KB
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
# LOCAL DEV ONLY — not used in production.
# Production uses native nginx + certbot on the VPS.
# This file is only needed if running the full Docker Compose stack locally.
upstream moltgrid {
server app:8000;
}
server {
listen 80;
server_name _;
# Landing page
location / {
root /var/www;
try_files /landing.html =404;
}
# API endpoints
location /v1/ {
proxy_pass http://moltgrid;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300s;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# Contact page
location /contact {
proxy_pass http://moltgrid;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# Admin panel
location /admin {
proxy_pass http://moltgrid;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# Swagger docs
location /docs {
proxy_pass http://moltgrid;
proxy_set_header Host $host;
}
location /openapi.json {
proxy_pass http://moltgrid;
proxy_set_header Host $host;
}
}