diff --git a/Dockerfile b/Dockerfile index cd4407bc84dd2dd1f4dae73f83a204ef910b8a5a..45128e0e738cb31a012d0842ff8f1c8248d8253d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/dist/config.js b/dist/config.js index b15f5340af6e934bd15bbf6c8336ef82879f63aa..7ac282e292f1c50bcc5ccca14069824b7f5196bc 100644 --- a/dist/config.js +++ b/dist/config.js @@ -1,6 +1,6 @@ // 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' } diff --git a/nginx/default.conf b/nginx/default.conf index 46f3328ac82981cd09561c0c2028161735ed8eff..71c94784c6ca291c73e2812e392933db4d19a2f7 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -1,51 +1,55 @@ 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 { diff --git a/public/config.js b/public/config.js index b15f5340af6e934bd15bbf6c8336ef82879f63aa..7ac282e292f1c50bcc5ccca14069824b7f5196bc 100644 --- a/public/config.js +++ b/public/config.js @@ -1,6 +1,6 @@ // 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' }