nginx.conf
conf1 kB19 linesIn solution.zip
solution.zipnginx.conf
server {
listen 80;
# The built frontend (index.html, assets/)
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
# API calls go to the backend container. "backend" is its service name
# in docker-compose.yml: Compose makes it resolvable as a hostname.
location /api/ {
proxy_pass http://backend:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}