Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Stage 1, based on Node.js, to build and compile Angular

FROM node:16.10.0-alpine as builder
FROM node:20.19.5-alpine as builder

WORKDIR /ng-app

Expand All @@ -27,4 +27,4 @@ FROM nginx:1.19.8-alpine
COPY ./nginx.conf /etc/nginx/conf.d/default.conf

## From ‘builder’ stage copy over the artifacts in dist folder to default nginx public folder
COPY --from=builder /ng-app/dist /usr/share/nginx/html
COPY --from=builder /ng-app/dist/browser /usr/share/nginx/html
4 changes: 2 additions & 2 deletions Dockerfile-nas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Stage 1, based on Node.js, to build and compile Angular

FROM node:16.10.0-alpine as builder
FROM node:20.19.5-alpine as builder

WORKDIR /ng-app

Expand All @@ -24,4 +24,4 @@ FROM nginx:1.19.8-alpine
COPY ./nginx.conf /etc/nginx/conf.d/default.conf

## From ‘builder’ stage copy over the artifacts in dist folder to default nginx public folder
COPY --from=builder /ng-app/dist /usr/share/nginx/html
COPY --from=builder /ng-app/dist/browser /usr/share/nginx/html
4 changes: 2 additions & 2 deletions Dockerfile-prod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# Stage 1, based on Node.js, to build and compile Angular

FROM node:16.10.0-alpine as builder
FROM node:20.19.5-alpine as builder

WORKDIR /ng-app

Expand All @@ -24,4 +24,4 @@ FROM nginx:1.19.8-alpine
COPY ./nginx.conf /etc/nginx/conf.d/default.conf

## From ‘builder’ stage copy over the artifacts in dist folder to default nginx public folder
COPY --from=builder /ng-app/dist /usr/share/nginx/html
COPY --from=builder /ng-app/dist/browser /usr/share/nginx/html
6 changes: 3 additions & 3 deletions Dockerfile2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Stage 1, based on Node.js, to build and compile Angular

FROM node:9.4.0-alpine as builder
FROM node:20.19.5-alpine as builder

COPY package.json ./

Expand All @@ -29,11 +29,11 @@ RUN npm run build:aot:prod
FROM nginx:1.13.12-alpine

COPY ./config/nginx-custom.conf /etc/nginx/conf.d/default.conf

## 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 /usr/share/nginx/html
COPY --from=builder /ng-app/dist/browser /usr/share/nginx/html

CMD ["nginx", "-g", "daemon off;"]
20 changes: 9 additions & 11 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist",
"outputPath": {
"base": "dist"
},
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"polyfills": [
"src/polyfills.ts"
],
"assets": [
{
"glob": "**/*",
Expand All @@ -30,12 +33,11 @@
"src/styles.css"
],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
"namedChunks": true,
"browser": "src/main.ts"
},
"configurations": {
"nas": {
Expand All @@ -50,8 +52,6 @@
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand All @@ -71,8 +71,6 @@
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand Down
Loading