changed nginx to proxy to API_URL
This commit is contained in:
parent
9727c7c88d
commit
8981d07ed6
@ -8,6 +8,24 @@ server {
|
||||
proxy_hide_header WWW-Authenticate;
|
||||
try_files $uri$args $uri$args/ $uri $uri/ /index.html =404;
|
||||
}
|
||||
location /project {
|
||||
proxy_pass $API_URL
|
||||
}
|
||||
location /reanalyse {
|
||||
proxy_pass $API_URL
|
||||
}
|
||||
location /upload {
|
||||
proxy_pass $API_URL
|
||||
}
|
||||
location /download {
|
||||
proxy_pass $API_URL
|
||||
}
|
||||
location /delete {
|
||||
proxy_pass $API_URL
|
||||
}
|
||||
location /status {
|
||||
proxy_pass $API_URL
|
||||
}
|
||||
gzip_min_length 1000;
|
||||
gzip on;
|
||||
gzip_http_version 1.0;
|
||||
@ -21,12 +21,14 @@ RUN yarn build --prod --project=red-ui
|
||||
FROM nginx:1.17.6-alpine
|
||||
|
||||
## Copy our default nginx config
|
||||
COPY docker/common/nginx/default.conf /etc/nginx/conf.d/
|
||||
COPY docker/common/nginx/ngix.conf.template /ngix.conf.templat
|
||||
|
||||
## Remove default nginx website
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
## From ‘builder’ stage copy over the artifacts in dist folder to default nginx public folder
|
||||
COPY --from=builder /ng-app/dist/apps/red-ui /usr/share/nginx/html
|
||||
RUN chmod o+r -R /usr/share/nginx/html
|
||||
RUN chmod g+r -R /usr/share/nginx/html
|
||||
COPY docker/red-ui/docker-entrypoint.sh /
|
||||
CMD ["/docker-entrypoint.sh"]
|
||||
|
||||
@ -13,3 +13,5 @@ echo '{
|
||||
}' > /usr/share/nginx/html/assets/config/config.json
|
||||
|
||||
nginx -g 'daemon off;'
|
||||
|
||||
envsubst '$API_URL' < /nginx.conf.template > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user