Browse Source

changed client doker port

bach 2 years ago
parent
commit
5ba190b8d7
2 changed files with 28 additions and 14 deletions
  1. 27 13
      README.md
  2. 1 1
      docker-compose.yml

+ 27 - 13
README.md

@@ -42,7 +42,7 @@ the api is ready, you can go to http://localhost:8984/home
 before you can use the client you need to trigger this url http://localhost:8984/indexing
 
 ## Client
-open http://localhost:8988 in your browser
+open http://localhost:8998 in your browser
 
 ## Vhost or Cross Origins Policy
 Cross origin poilicy will block the api requests from client
@@ -92,27 +92,41 @@ you have to serve client/dist/index.html with your own webserver (e.g. nginx, ap
 ### nginx conf
 ```nginx
 server {
-  listen 80;
-  server_name domain.tld;
+    listen 80;
+    server_name dev.api.gdp.fr;
+
+    access_log off;
+    error_log  /var/log/nginx/gdp/error.log error;
+
+    location / {
+        proxy_pass http://127.0.0.1:8984;
+        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;
+        add_header Access-Control-Allow-Origin *;
+    }
+}
 
-  root /path/to/docker-gdp/client/dist/;
-  index index.html;
-  location / {
-    try_files $uri $uri/ /index.html;
-  }
+server {
+  listen 80;
+  server_name dev.gdp.fr;
 
-  charset utf-8;
+  access_log off;
+  error_log  /var/log/nginx/gdp/error.log error;
 
-  location ~/api(.*)$ {
-    proxy_pass http://127.0.0.1:8984$1$is_args$args;
-    #proxy_set_header Host $host;
+  location / {
+    proxy_pass http://127.0.0.1:8998;
+    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 *;
   }
 }

+ 1 - 1
docker-compose.yml

@@ -20,7 +20,7 @@ services:
       - "${CLIENT_ROOT}:/app"
       # - client-home:/home/gdp
     ports:
-      - 8988:8988
+      - 8998:8988
     working_dir: "/app"
     depends_on:
       - basex