diff --git a/nginx/Dockerfile.dev b/nginx/Dockerfile.dev new file mode 100644 index 000000000..007148685 --- /dev/null +++ b/nginx/Dockerfile.dev @@ -0,0 +1 @@ +FROM nginx \ No newline at end of file diff --git a/nginx/dev-default.conf b/nginx/dev-default.conf new file mode 100644 index 000000000..c194f2107 --- /dev/null +++ b/nginx/dev-default.conf @@ -0,0 +1,53 @@ +server { + listen 80; + # listen 443 ssl; + + # ssl_certificate /etc/nginx/ssl/nginx.crt; + # ssl_certificate_key /etc/nginx/ssl/nginx.key; + + location /ph-backend/ { + rewrite ^/ph-backend/(.*) /$1 break; + + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + proxy_set_header Host $http_host; + proxy_set_header X-NginX-Proxy true; + + proxy_pass http://backend:8000; + proxy_redirect off; + + proxy_cookie_path / "/; HttpOnly; SameSite=strict"; + } + + location /kms/ { + rewrite ^/kms/(.*) /kms/$1 break; + + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + proxy_set_header Host $http_host; + proxy_set_header X-NginX-Proxy true; + + proxy_pass http://backend:8000; + proxy_redirect off; + + proxy_cookie_path / "/; HttpOnly; SameSite=strict"; + } + + location / { + include /etc/nginx/mime.types; + + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + proxy_set_header Host $http_host; + proxy_set_header X-NginX-Proxy true; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_pass http://frontend:3000; + proxy_redirect off; + } +}