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
|
before you can use the client you need to trigger this url http://localhost:8984/indexing
|
||||||
|
|
||||||
## Client
|
## Client
|
||||||
open http://localhost:8988 in your browser
|
open http://localhost:8998 in your browser
|
||||||
|
|
||||||
## Vhost or Cross Origins Policy
|
## Vhost or Cross Origins Policy
|
||||||
Cross origin poilicy will block the api requests from client
|
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 conf
|
||||||
```nginx
|
```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 {
|
server {
|
||||||
listen 80;
|
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 / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
proxy_pass http://127.0.0.1:8998;
|
||||||
}
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
charset utf-8;
|
|
||||||
|
|
||||||
location ~/api(.*)$ {
|
|
||||||
proxy_pass http://127.0.0.1:8984$1$is_args$args;
|
|
||||||
#proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_buffer_size 128k;
|
proxy_buffer_size 128k;
|
||||||
proxy_buffers 4 256k;
|
proxy_buffers 4 256k;
|
||||||
proxy_busy_buffers_size 256k;
|
proxy_busy_buffers_size 256k;
|
||||||
proxy_redirect off;
|
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ services:
|
|||||||
- "${CLIENT_ROOT}:/app"
|
- "${CLIENT_ROOT}:/app"
|
||||||
# - client-home:/home/gdp
|
# - client-home:/home/gdp
|
||||||
ports:
|
ports:
|
||||||
- 8988:8988
|
- 8998:8988
|
||||||
working_dir: "/app"
|
working_dir: "/app"
|
||||||
depends_on:
|
depends_on:
|
||||||
- basex
|
- basex
|
||||||
|
|||||||
Reference in New Issue
Block a user