File tree 16 files changed +59
-212
lines changed
16 files changed +59
-212
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : Build & Deploy
2
+ on : push
3
+
4
+ jobs :
5
+ next-app :
6
+ uses : navikt/teamesyfo-github-actions-workflows/.github/workflows/next-app.yaml@main
7
+ secrets : inherit
8
+ with :
9
+ app : oppfolgingsplan-frontend
10
+ base-path : /syk/oppfolgingsplaner
Original file line number Diff line number Diff line change
1
+ name : Demo delete
2
+ on : delete
3
+
4
+ jobs :
5
+ branch-delete :
6
+ uses : navikt/teamesyfo-github-actions-workflows/.github/workflows/next-app-demo-delete.yaml@main
7
+ secrets : inherit
8
+ with :
9
+ app : oppfolgingsplan-frontend
10
+ base-path : /syk/oppfolgingsplaner
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- FROM node:16-alpine
1
+ FROM gcr.io/distroless/nodejs:18 as runtime
2
2
3
- ENV NODE_ENV production
3
+ WORKDIR /app
4
4
5
- COPY /next.config.js ./
6
- COPY /.next ./.next
7
- COPY /public ./public
8
- COPY /node_modules ./node_modules
9
- COPY /package.json ./package.json
5
+ COPY package.json /app/
6
+ COPY .next/standalone /app/
7
+ COPY public /app/public/
10
8
11
- CMD [ "npm" , "start" ]
9
+ EXPOSE 3000
12
10
13
- EXPOSE 8080
11
+ ENV NODE_ENV=production
12
+
13
+ CMD ["server.js" ]
Original file line number Diff line number Diff line change
1
+ NEXT_PUBLIC_BASE_PATH=/syk/oppfolgingsplaner
2
+ NEXT_PUBLIC_ASSET_PREFIX=https://cdn.nav.no/team-esyfo/oppfolgingsplan-frontend
3
+ NEXT_PUBLIC_RUNTIME_ENVIRONMENT=demo
4
+ NEXT_PUBLIC_TELEMETRY_URL=https://telemetry.ekstern.dev.nav.no/collect
5
+ NEXT_PUBLIC_DITT_SYKEFRAVAER_URL=https://demo.ekstern.dev.nav.no/syk/sykefravaer
6
+ NEXT_PUBLIC_DINE_SYKMELDTE_URL=https://dinesykmeldte.ekstern.dev.nav.no/arbeidsgiver/sykmeldte
Original file line number Diff line number Diff line change
1
+ NEXT_PUBLIC_BASE_PATH = /syk/oppfolgingsplaner
2
+ NEXT_PUBLIC_ASSET_PREFIX = https://cdn.nav.no/team-esyfo/oppfolgingsplan-frontend
3
+ NEXT_PUBLIC_RUNTIME_ENVIRONMENT = dev
4
+ NEXT_PUBLIC_TELEMETRY_URL = https://telemetry.ekstern.dev.nav.no/collect
5
+ NEXT_PUBLIC_DITT_SYKEFRAVAER_URL = https://www.ekstern.dev.nav.no/syk/sykefravaer
6
+ NEXT_PUBLIC_DINE_SYKMELDTE_URL = https://www.ekstern.dev.nav.no/arbeidsgiver/sykmeldte
Original file line number Diff line number Diff line change
1
+ NEXT_PUBLIC_BASE_PATH = /syk/oppfolgingsplaner
2
+ NEXT_PUBLIC_ASSET_PREFIX = https://cdn.nav.no/team-esyfo/oppfolgingsplan-frontend
3
+ NEXT_PUBLIC_RUNTIME_ENVIRONMENT = prod
4
+ NEXT_PUBLIC_TELEMETRY_URL = https://telemetry.nav.no/collect
5
+ NEXT_PUBLIC_DITT_SYKEFRAVAER_URL = https://www.nav.no/syk/sykefravaer
6
+ NEXT_PUBLIC_DINE_SYKMELDTE_URL = https://www.nav.no/arbeidsgiver/sykmeldte
Original file line number Diff line number Diff line change 1
1
apiVersion : " nais.io/v1alpha1"
2
2
kind : " Application"
3
3
metadata :
4
- name : oppfolgingsplan-frontend -demo
4
+ name : {{appname}} -demo
5
5
namespace : team-esyfo
6
6
labels :
7
7
team : team-esyfo
8
+ branchState : {{branchState}}
8
9
spec :
9
10
image : {{ image }}
10
11
replicas :
11
12
min : 1
12
13
max : 1
13
14
cpuThresholdPercentage : 90
14
- port : 8080
15
+ port : 3000
15
16
tokenx :
16
17
enabled : false
17
18
idporten :
40
41
cpu : 200m
41
42
memory : 256Mi
42
43
ingresses :
43
- - " https://demo.ekstern.dev.nav.no/syk/oppfolgingsplaner "
44
+ - {{ingress}}
44
45
accessPolicy :
45
46
outbound :
46
47
external :
Original file line number Diff line number Diff line change 11
11
min : 2
12
12
max : 4
13
13
cpuThresholdPercentage : 90
14
- port : 8080
14
+ port : 3000
15
15
tokenx :
16
16
enabled : true
17
17
idporten :
Original file line number Diff line number Diff line change 11
11
min : 2
12
12
max : 4
13
13
cpuThresholdPercentage : 90
14
- port : 8080
14
+ port : 3000
15
15
tokenx :
16
16
enabled : true
17
17
idporten :
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ const moduleExports = {
8
8
// ssr and displayName are configured by default
9
9
styledComponents : true ,
10
10
} ,
11
+ output : "standalone" ,
11
12
} ;
12
13
13
14
module . exports = moduleExports ;
Original file line number Diff line number Diff line change 2
2
"name" : " oppfolgingsplan-frontend" ,
3
3
"version" : " 0.1.0" ,
4
4
"private" : true ,
5
+ "engines" : {
6
+ "node" : " 18"
7
+ },
5
8
"scripts" : {
6
9
"dev" : " next dev" ,
7
10
"build" : " next build" ,
8
- "start" : " next start -p 8080" ,
11
+ "start:watch" : " NODE_OPTIONS='--inspect' next dev | pino-pretty" ,
12
+ "start:prod" : " NODE_OPTIONS='-r next-logger' next start" ,
9
13
"lint" : " next lint" ,
10
14
"prettier" : " prettier --write ./src/**" ,
11
15
"prepare" : " husky install" ,
Original file line number Diff line number Diff line change @@ -20,26 +20,10 @@ export const isDev = () => {
20
20
} ;
21
21
22
22
export const dineSykemeldteRoot = ( ) : string => {
23
- if ( isDemo ( ) ) {
24
- return process . env . NEXT_PUBLIC_DINE_SYKMELDTE_DEMO_URL || "" ;
25
- }
26
-
27
- if ( isDev ( ) ) {
28
- return process . env . NEXT_PUBLIC_DINE_SYKMELDTE_DEV_URL || "" ;
29
- }
30
-
31
23
return process . env . NEXT_PUBLIC_DINE_SYKMELDTE_URL || "" ;
32
24
} ;
33
25
34
26
export const dittSykefravarRoot = ( ) : string => {
35
- if ( isDemo ( ) ) {
36
- return process . env . NEXT_PUBLIC_DITT_SYKEFRAVAER_DEMO_URL || "" ;
37
- }
38
-
39
- if ( isDev ( ) ) {
40
- return process . env . NEXT_PUBLIC_DITT_SYKEFRAVAER_DEV_URL || "" ;
41
- }
42
-
43
27
return process . env . NEXT_PUBLIC_DITT_SYKEFRAVAER_URL || "" ;
44
28
} ;
45
29
export const displayTestScenarioSelector =
You can’t perform that action at this time.
0 commit comments