File tree Expand file tree Collapse file tree 4 files changed +44
-3
lines changed Expand file tree Collapse file tree 4 files changed +44
-3
lines changed Original file line number Diff line number Diff line change 1+ FROM node:latest as build
2+
3+ # Set the working directory
4+ WORKDIR /usr/local/app
5+
6+ # Add the source code to app
7+ COPY ./ /usr/local/app/
8+
9+ # Install all the dependencies
10+ RUN npm install
11+
12+ # Generate the build of the application
13+ RUN npm run build
14+
15+
16+ # Stage 2: Serve app with nginx server
17+
18+ # Use official nginx image as the base image
19+ FROM nginx:latest
20+
21+ # Copy the nginx configuration file to the container
22+ COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
23+
24+ # Copy the build output to replace the default nginx contents.
25+ COPY --from=build /usr/local/app/dist/notes-app /usr/share/nginx/html
26+
27+ # Expose port 80
28+ EXPOSE 80
Original file line number Diff line number Diff line change 1515 "prefix" : " app" ,
1616 "architect" : {
1717 "build" : {
18- "builder" : " @angular-devkit/build-angular:application " ,
18+ "builder" : " @angular-devkit/build-angular:browser " ,
1919 "options" : {
2020 "outputPath" : " dist/notes-app" ,
2121 "index" : " src/index.html" ,
22- "browser " : " src/main.ts" ,
22+ "main " : " src/main.ts" ,
2323 "polyfills" : [],
2424 "tsConfig" : " tsconfig.app.json" ,
2525 "inlineStyleLanguage" : " scss" ,
Original file line number Diff line number Diff line change 1+ events {}
2+ http {
3+ include /etc/nginx/mime.types ;
4+ server {
5+ listen 80 ;
6+ server_name localhost;
7+ root /usr/share/nginx/html;
8+ index index .html;
9+ location / {
10+ try_files $uri $uri / /index .html;
11+ }
12+ }
13+ }
Original file line number Diff line number Diff line change 11export const environment = {
2- keycloakUrl : '' ,
2+ keycloakUrl : 'http://localhost:8090 ' ,
33 keycloakRealm : 'notes' ,
44 keycloakClientId : 'notes-client' ,
55 production : true
You can’t perform that action at this time.
0 commit comments