first commit
This commit is contained in:
31
nginx.conf
Normal file
31
nginx.conf
Normal file
@@ -0,0 +1,31 @@
|
||||
events {}
|
||||
|
||||
http {
|
||||
upstream api_server {
|
||||
server api:3000;
|
||||
}
|
||||
|
||||
upstream postgrest_server {
|
||||
server postgrest:3000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 443;
|
||||
# For prototype, we might just use HTTP or self-signed.
|
||||
# Assuming HTTP for localhost dev for now, or we need certs.
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://api_server/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location /rest/ {
|
||||
rewrite ^/rest/(.*) /$1 break;
|
||||
proxy_pass http://postgrest_server;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user