Skip to content

Commit

Permalink
bug fixing--
Browse files Browse the repository at this point in the history
  • Loading branch information
Ozcan Aytac; Insylva project committed Jun 30, 2020
1 parent 3121829 commit 9d749e0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 10 deletions.
2 changes: 0 additions & 2 deletions login/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ while [ "$1" != "" ]; do
shift
done



docker build --no-cache --build-arg SSH_KEY="$SSH_KEY" --build-arg SSH_KEY_PASSPHRASE="$SSH_KEY_PASSPHRASE" \
--build-arg MODE_ENV="production" \
--build-arg IN_SYLVA_CLIENT_ID="in-sylva.user.app" \
Expand Down
2 changes: 1 addition & 1 deletion portal/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ while [ "$1" != "" ]; do
done

# docker build --build-arg SSH_KEY="$SSH_KEY" --build-arg SSH_KEY_PASSPHRASE="$SSH_KEY_PASSPHRASE" --tag in-sylva.portal ./portal/.
docker build --no-cache --build-arg SSH_KEY="$SSH_KEY" --build-arg SSH_KEY_PASSPHRASE="$SSH_KEY_PASSPHRASE" --tag in-sylva.portal ./portal/.
# docker build --no-cache --build-arg SSH_KEY="$SSH_KEY" --build-arg SSH_KEY_PASSPHRASE="$SSH_KEY_PASSPHRASE" --tag in-sylva.portal ./portal/.
14 changes: 12 additions & 2 deletions portal/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# load_module modules/ngx_stream_js_module.so;
# load_module modules/ngx_http_geoip_module.so;

# resolver 127.0.0.1 [::];
resolver 127.0.0.1 [::];

upstream backend_gatekeeper {
hash $remote_addr$remote_port consistent;
Expand Down Expand Up @@ -34,7 +34,7 @@ server {

listen 3000;
listen [::]:3000;
server_name w3.avignon.inra.fr/bas_insylva//portal/;
server_name w3.avignon.inra.fr/bas_insylva/portal/;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down Expand Up @@ -73,6 +73,10 @@ server {
client_max_body_size 200M;
}

location /static/media/ {
try_files $uri /usr/share/nginx/html/static/media;
}

location / {
# js_content hello;

Expand All @@ -88,6 +92,12 @@ server {
}
try_files $uri $fallback_file;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;

if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin: $http_origin');
add_header 'Access-Control-Allow-Origin: GET, POST, DELETE, PUT, PATCH, OPTIONS');
Expand Down
12 changes: 11 additions & 1 deletion portal/nginx/nginx_generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# load_module modules/ngx_stream_js_module.so;
# load_module modules/ngx_http_geoip_module.so;

# resolver 127.0.0.1 [::];
resolver 127.0.0.1 [::];

upstream backend_gatekeeper {
hash $remote_addr$remote_port consistent;
Expand Down Expand Up @@ -73,6 +73,10 @@ server {
client_max_body_size 200M;
}

location /static/media/ {
try_files $uri /usr/share/nginx/html/static/media;
}

location / {
# js_content hello;

Expand All @@ -88,6 +92,12 @@ server {
}
try_files $uri $fallback_file;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;

if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin: $http_origin');
add_header 'Access-Control-Allow-Origin: GET, POST, DELETE, PUT, PATCH, OPTIONS');
Expand Down
2 changes: 1 addition & 1 deletion search/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ REACT_APP_IN_SYLVA_GATEKEEPER_HOST=/bas_insylva/search/gatekeeper
REACT_APP_IN_SYLVA_SOURCE_MANAGER_HOST=/bas_insylva/search/source-manager
REACT_APP_IN_SYLVA_KEYCLOAK_HOST=/bas_insylva/search/keycloak
REACT_APP_IN_SYLVA_SEARCH_HOST=/bas_insylva/search/search-api
REACT_APP_IN_SYLVA_LOGIN_HOST=http://w3.avignon.inra.fr/bas_insylva/login/
REACT_APP_IN_SYLVA_LOGIN_HOST=http://w3.avignon.inra.fr/bas_insylvalogin/
REACT_APP_IN_SYLVA_CLIENT_ID=in-sylva.user.app
REACT_APP_IN_SYLVA_GRANT_TYPE=password
REACT_APP_IN_SYLVA_REALM=in-sylva
Expand Down
4 changes: 2 additions & 2 deletions search/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ server {

listen 3001;
listen [::]:3001;
server_name w3.avignon.inra.fr/bas_insylva//search/;
server_name w3.avignon.inra.fr/bas_insylva/search/;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down Expand Up @@ -94,7 +94,7 @@ server {
# try_files $uri /bas_insylva/search/static/media/;
#}
location / {
# include /etc/nginx/mime.types;

# if ($arg_token ~ "^$") { return 404; }

# set $token $arg_token;
Expand Down
2 changes: 1 addition & 1 deletion search/nginx/nginx_generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ server {
# try_files $uri /bas_insylva/search/static/media/;
#}
location / {
# include /etc/nginx/mime.types;

# if ($arg_token ~ "^$") { return 404; }

# set $token $arg_token;
Expand Down

0 comments on commit 9d749e0

Please sign in to comment.