changed client doker port
This commit is contained in:
@@ -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
|
||||
@@ -91,28 +91,42 @@ you have to serve client/dist/index.html with your own webserver (e.g. nginx, ap
|
||||
|
||||
### nginx conf
|
||||
```nginx
|
||||
server {
|
||||
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 *;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name domain.tld;
|
||||
server_name dev.gdp.fr;
|
||||
|
||||
access_log off;
|
||||
error_log /var/log/nginx/gdp/error.log error;
|
||||
|
||||
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$is_args$args;
|
||||
#proxy_set_header Host $host;
|
||||
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
@@ -20,7 +20,7 @@ services:
|
||||
- "${CLIENT_ROOT}:/app"
|
||||
# - client-home:/home/gdp
|
||||
ports:
|
||||
- 8988:8988
|
||||
- 8998:8988
|
||||
working_dir: "/app"
|
||||
depends_on:
|
||||
- basex
|
||||
|
||||
Reference in New Issue
Block a user