Commit d44efac2 authored by cazenave's avatar cazenave
Browse files

change url to ingress loadbalancer

parent bfeedad8
......@@ -10,6 +10,9 @@ COPY node_modules/vue-select src/~vue-select
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY nginx/start.sh /start.sh
COPY nginx/certs/server.crt /etc/nginx/certs/server.crt
COPY nginx/certs/server.key /etc/nginx/certs/server.key
COPY src src
COPY dist /usr/share/nginx/html
COPY dist /usr/share/nginx/html/app
......
// public/config.js
window.config = {
publicPath: '',
apiURL: 'http://'+fdp-api.default.svc.cluster.local,
persistentURL: 'http://'+fdp-api.default.svc.cluster.local
apiURL: 'http://6epato5ckc.lb.c1.gra7.k8s.ovh.net',
persistentURL: 'http://6epato5ckc.lb.c1.gra7.k8s.ovh.net'
}
upstream fdp-api {
server fdp-api.default.svc.cluster.local;
server nginx-ingress-1591800447-controller.default.svc.cluster.local;
}
server {
listen 80;
listen 443 default_server ssl;
ssl_certificate /etc/nginx/certs/server.crt;
ssl_certificate_key /etc/nginx/certs/server.key;
server_name localhost;
location / {
set $should_proxy 1;
# Client html
if ($http_accept ~ '(text/html)') {
set $should_proxy 0;
}
# Client assets
if ($request_uri ~ '(\.css)|(\.png)|(\.js)|(\.ico)$') {
set $should_proxy 0;
}
# RDF API
if ($request_uri ~ '(\?format=(.+))$') {
set $should_proxy 1;
}
# Swagger
if ($request_uri ~ '(swagger-ui\.html)') {
set $should_proxy 1;
}
# Swagger assets
if ($request_uri ~ '^(/webjars)') {
set $should_proxy 1;
}
if ($should_proxy) {
proxy_pass http://fdp-api;
break;
}
root /usr/share/nginx/html;
add_header Last-Modified "";
index index.html index.htm;
}
location /
{
set $should_proxy 1;
# Client html
if ($http_accept ~ '(text/html)') {
set $should_proxy 0;
}
# Client assets
if ($request_uri ~ '(\.css)|(\.png)|(\.js)|(\.ico)$') {
set $should_proxy 0;
}
# RDF API
if ($request_uri ~ '(\?format=(.+))$') {
set $should_proxy 1;
}
# Swagger
if ($request_uri ~ '(swagger-ui\.html)') {
set $should_proxy 1;
}
# Swagger assets
if ($request_uri ~ '^(/webjars)') {
set $should_proxy 1;
}
if ($should_proxy) {
proxy_pass http://fdp-api;
break;
}
root /usr/share/nginx/html;
add_header Last-Modified "";
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
......
// public/config.js
window.config = {
publicPath: '',
apiURL: 'http://'+fdp-api.default.svc.cluster.local,
persistentURL: 'http://'+fdp-api.default.svc.cluster.local
apiURL: 'http://6epato5ckc.lb.c1.gra7.k8s.ovh.net',
persistentURL: 'http://6epato5ckc.lb.c1.gra7.k8s.ovh.net'
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment