Skip to content

Commit

Permalink
Local dev enhancements (#45)
Browse files Browse the repository at this point in the history
* Modified docker yml config to use .env.dev

* Few more addition Contribution.md

* Added suggested changes for Local Dev docs

* Added changes for local dev using http

---------

Co-authored-by: Rohan Chaturvedi <[email protected]>
Co-authored-by: Nimish <[email protected]>
  • Loading branch information
3 people authored Oct 16, 2023
1 parent 796d878 commit 7cfe1dd
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions nginx/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM nginx
53 changes: 53 additions & 0 deletions nginx/dev-default.conf
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit 7cfe1dd

Please sign in to comment.