File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 1- FROM node:12 as build-stage
1+ FROM node:18 as build-stage
2+
23WORKDIR /app
3- COPY package*.json ./
4- RUN npm install
54COPY . .
5+ RUN npm install
66RUN npm run build
77
88FROM nginx:1.17
9- COPY --from=build-stage /app/dist/ /usr/share/nginx/html
9+
10+ COPY nginx.conf /etc/nginx/conf.d/default.conf
11+ RUN rm /usr/share/nginx/html/50x.html /usr/share/nginx/html/index.html
12+ COPY --from=build-stage /app/dist/grades-application-m120/ /usr/share/nginx/html
Original file line number Diff line number Diff line change 1+ server {
2+ listen 80 ;
3+ listen [::]:80 ;
4+ root /usr/share/nginx/html;
5+ index index .html;
6+
7+ location / {
8+ try_files $uri /index .html;
9+ }
10+ }
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ const routes: Routes = [
1212 { path : 'home' , component : HomeComponent } ,
1313 { path : 'edit/:id' , component : GradesOverviewComponent } ,
1414 { path : 'reset/:otp' , component : PasswordResetConfirmComponent } ,
15+ { path : "" , redirectTo : "/login" } ,
1516] ;
1617@NgModule ( {
1718 imports : [ RouterModule . forRoot ( routes ) ] ,
You can’t perform that action at this time.
0 commit comments