From 52127adb08cff9e6bf6bad0125c3b5f7e0d04db2 Mon Sep 17 00:00:00 2001 From: Parker Date: Mon, 11 Nov 2024 23:57:44 -0600 Subject: Merge API+APP in Docker --- nginx.conf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 nginx.conf (limited to 'nginx.conf') diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..c07ddcb --- /dev/null +++ b/nginx.conf @@ -0,0 +1,24 @@ +server { + listen 5000; + + # Serve React static files + location / { + root /usr/share/nginx/html; + try_files $uri $uri/ /index.html; + } + + # Proxy API requests to FastAPI + location /api/ { + proxy_pass http://localhost:5252; + set_real_ip_from 0.0.0.0/0; + real_ip_header X-Forwarded-For; + real_ip_recursive on; + } + # Proxy short link requests to FastAPI + location /c/ { + proxy_pass http://localhost:5252; + set_real_ip_from 0.0.0.0/0; + real_ip_header X-Forwarded-For; + real_ip_recursive on; + } +} \ No newline at end of file -- cgit v1.2.3-70-g09d2