Reworked build and nginx conf
This commit is contained in:
parent
441d175177
commit
e5efe29fe6
@ -13,10 +13,11 @@ server {
|
||||
}
|
||||
|
||||
location /ui/ {
|
||||
alias /usr/share/nginx/html/redact-manager/;
|
||||
alias /usr/share/nginx/html/ui/;
|
||||
proxy_hide_header WWW-Authenticate;
|
||||
try_files $uri$args $uri$args/ $uri $uri/ /ui/index.html =404;
|
||||
}
|
||||
try_files $uri$args $uri$args/ $uri $uri/ /index.html =404;
|
||||
}
|
||||
|
||||
client_max_body_size 0;
|
||||
gzip_min_length 1000;
|
||||
gzip on;
|
||||
|
||||
@ -10,7 +10,17 @@ RUN yarn install && mkdir /ng-app && mv ./node_modules ./ng-app
|
||||
|
||||
WORKDIR /ng-app
|
||||
|
||||
COPY . .
|
||||
COPY apps apps
|
||||
COPY libs libs
|
||||
COPY tools tools
|
||||
COPY package.json package.json
|
||||
COPY yarn.lock yarn.lock
|
||||
COPY tslint.json ts.lint.json
|
||||
COPY angular.json angular.json
|
||||
COPY nx.json nx.json
|
||||
COPY tslint.json tslint.json
|
||||
COPY tsconfig.base.json tsconfig.base.json
|
||||
COPY versions.sh version.sh
|
||||
|
||||
## Build the angular app in production mode and store the artifacts in dist folder
|
||||
RUN yarn lint
|
||||
@ -18,6 +28,7 @@ RUN npm version patch --no-git-tag-version
|
||||
RUN yarn build --project=red-ui --base-href /ui/
|
||||
### STAGE 2: Setup ###
|
||||
|
||||
|
||||
FROM nginx:1.19.2-alpine
|
||||
|
||||
## Copy our default nginx config
|
||||
@ -27,7 +38,7 @@ COPY docker/common/nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
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/redact-manager
|
||||
COPY --from=builder /ng-app/dist/apps/red-ui /usr/share/nginx/html/ui
|
||||
RUN chmod o+r -R /usr/share/nginx/html
|
||||
RUN chmod g+r -R /usr/share/nginx/html
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user