File tree Expand file tree Collapse file tree 5 files changed +6
-41
lines changed
Expand file tree Collapse file tree 5 files changed +6
-41
lines changed Original file line number Diff line number Diff line change 11# Stage 1: Build frontend
2- FROM node:fermium as build-stage
2+ FROM node:18.16.0-alpine3.17 as build-stage
33WORKDIR ./app
44COPY ./package*.json /app/
55RUN npm ci
66COPY ./ /app/
7- # Create Angular environment files in build time based in BRANCH and BUILD args
8- ARG BRANCH
9- RUN node set-env.js $BRANCH
7+
108RUN npm run build -- --output-path=./dist/out --output-hashing=all
119
1210# Stage 2: Serve it using Ngnix
Original file line number Diff line number Diff line change 11# AngularFrontend
22
3- This project was generated with [ Angular CLI] ( https://github.com/angular/angular-cli ) version 15.2.6 .
3+ This project was generated with [ Angular CLI] ( https://github.com/angular/angular-cli ) version 14.0.2 .
44
55## Development server
66
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- # An ARG declared before the FROM instruction cannot be used after the FROM
2- ARG TAG
3- FROM node:$TAG
1+ FROM node:18.16.0-alpine3.17
42
53# Create app directory
64RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app
75WORKDIR /home/node/app
86
97# Install app dependencies
10- # A wildcard is used to ensure both package.json AND package-lock.json are copied
11- # where available (npm@5+)
128COPY --chown=node:node package*.json ./
139# COPY --chown=node:node . .
1410USER node
1511
1612RUN npm install
1713
1814# If you are building your code for production
19- # RUN npm ci --only=production
15+ RUN npm ci
2016
2117# Bundle app source
2218COPY --chown=node:node . .
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ services:
55 container_name : angularfrontend
66 build :
77 context : ./AngularFrontend
8- args : [BRANCH=develop]
98 dockerfile : ./Dockerfile
109 nginx :
1110 container_name : middlenginx
@@ -17,12 +16,11 @@ services:
1716 volumes :
1817 - ./nginx.middle.conf:/etc/nginx/conf.d/default.conf:rw
1918 depends_on :
20- - nodebackend
19+ - backend
2120 backend :
2221 container_name : nodebackend
2322 build :
2423 context : ./NodeBackend
25- args : [TAG=fermium]
2624 dockerfile : ./Dockerfile
2725 ports :
2826 - " 3000:3000"
You can’t perform that action at this time.
0 commit comments