Browse Source

prod deployement fully functionnal

Bachir Soussi Chiadmi 3 years ago
parent
commit
70117bb616
2 changed files with 30 additions and 1 deletions
  1. 29 0
      README.md
  2. 1 1
      client

+ 29 - 0
README.md

@@ -89,6 +89,35 @@ basex container will stay up
 
 you have to serve client/dist/index.html with your own webserver (e.g. nginx, apache, etc)
 
+### nginx conf
+```nginx
+server {
+  listen 80;
+  server_name domain.tld;
+
+  root /path/to/docker-gdp/client/dist/;
+  index index.html;
+  location / {
+    try_files $uri $uri/ /index.html;
+  }
+
+  charset utf-8;
+
+  location ~/api(.*)$ {
+    proxy_pass http://127.0.0.1:8984$1;
+    #proxy_set_header Host $host;
+    proxy_set_header X-Real-IP $remote_addr;
+    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    proxy_set_header X-Forwarded-Proto $scheme;
+    proxy_buffer_size          128k;
+    proxy_buffers              4 256k;
+    proxy_busy_buffers_size    256k;
+    proxy_redirect      off;
+    add_header Access-Control-Allow-Origin *;
+  }
+}
+```
+
 ## Doc
 
 https://github.com/guidesDeParis/webapp/blob/master/install.md

+ 1 - 1
client

@@ -1 +1 @@
-Subproject commit 61303fde4d78585f5cec39a46ce9c84255286a24
+Subproject commit 3122fd9ccb0c17443407afc9552ed9f07384f2de