Skip to content

Commit 1faf2b7

Browse files
author
Michael Johansen
authoredMay 14, 2019
PFP-5626 Skille ut docker-config fra fpsak-frontend (navikt#551)
1 parent 2fd1e88 commit 1faf2b7

29 files changed

+82
-2144
lines changed
 

‎.dockerignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
.git
1+
.git*
22
*Dockerfile*
33
*docker-compose*
44
**/node_modules
55
cypress
66
coverage
77
.nyc_output
88
packages
9+
eslint
10+
travis
11+
webpack

‎.gitignore

+2-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/.idea
33
/bin/
44
/.tmp/
5+
/tmp/
56
/.happypack/
67
/.nyc_output/
78
/.eslint_loader_cache/
@@ -12,9 +13,6 @@ cypress.env.json
1213
*.iml
1314
*.log*
1415
/target/
15-
**/cypress/videos
16-
**/cypress/screenshots
17-
**/cypress/test-data/test-identer
1816
/node_modules
1917
npm-debug.log
2018
lib/
@@ -26,3 +24,4 @@ lerna-debug.log
2624
ssh.exe.stackdump
2725
ssh.exe.stackdump
2826
.DS_Store
27+
tmp/

‎DockerfileNext ‎Dockerfile

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
FROM navikt/nginx-spa-docker:latest
1+
FROM navikt/nginx-oidc:latest
22
# FPSAK spesifikk
3-
# Dette er den nye dockerfila som baserer seg på ferdigbygd baseimage.
4-
53
ENV APP_DIR="/app" \
64
APP_PATH_PREFIX="/fpsak" \
75
APP_CALLBACK_PATH="/fpsak/cb" \
@@ -13,5 +11,6 @@ ENV APP_DIR="/app" \
1311
COPY dist /app/fpsak/
1412

1513
#FPSAK spesifkk
16-
COPY public/proxy.nginx /nginx/proxy.nginx
17-
EXPOSE 9090
14+
COPY k8s/proxy.nginx /nginx/proxy.nginx
15+
16+
EXPOSE 9000 443

‎JenkinsfileAutoTag

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
node('DOCKER2') {
2-
def tagName=''
2+
def tagName=''
3+
dockerRegistry = "repo.adeo.no:5443"
34
stage('Checkout Tags') { // checkout only tags.
45
checkout scm
56
sh(script: 'git fetch --tags')
67
tagName=sh(returnStdout: true, script: 'git describe --tags `git rev-list --tags --max-count=1`').toString().trim()
78
echo "Tag to be deployed $tagName"
8-
9+
910
sh(script: 'git checkout $tagName')
1011
sh(script: 'git log --oneline -n10')
1112
}
1213
stage('Build and Push'){
1314
sh 'PATH=$PATH:/usr/local/lib/node/nodejs/bin:/opt/yarn-v1.12.3/bin; yarn install --ignore-scripts'
1415
sh 'PATH=$PATH:/usr/local/lib/node/nodejs/bin:/opt/yarn-v1.12.3/bin; yarn build'
15-
sh "docker build -t docker.adeo.no:5000/fpsak-frontend:$tagName -f ./docker/Dockerfile ./ --build-arg HTTPS_PROXY=$HTTPS_PROXY --build-arg HTTP_PROXY=$HTTP_PROXY"
16-
sh "docker tag docker.adeo.no:5000/fpsak-frontend:$tagName docker.adeo.no:5000/fpsak-frontend:latest"
17-
sh "docker push docker.adeo.no:5000/fpsak-frontend:$tagName"
18-
sh "docker push docker.adeo.no:5000/fpsak-frontend:latest"
16+
sh "docker build -t $dockerRegistry/fpsak-frontend:$tagName -f ./Dockerfile ./ --build-arg HTTPS_PROXY=$HTTPS_PROXY --build-arg HTTP_PROXY=$HTTP_PROXY"
17+
sh "docker tag $dockerRegistry/fpsak-frontend:$tagName $dockerRegistry/fpsak-frontend:latest"
18+
sh "docker push $dockerRegistry/fpsak-frontend:$tagName"
19+
sh "docker push $dockerRegistry/fpsak-frontend:latest"
1920
}
2021
stage('Deploy'){
2122
build job: 'fpsak-frontend-BUILD', parameters: [string(name: 'miljø', value: 't10'), string(name: 'versjonNummer', value: tagName)], wait: true

‎docker-compose.yml

+7-39
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,19 @@
11
version: '3'
22
services:
3-
fpfront:
4-
build:
5-
context: .
6-
dockerfile: DockerfileNext
3+
frontend:
4+
build: .
75
ports:
86
- 9090:9090
97
environment:
108
- APP_PORT=9090
11-
- APP_URL_FPSAK=http://fpsak:8080
12-
- OIDC_HOST_URL=http://host.docker.internal:8060/isso/oauth2
9+
- APP_URL_FPSAK=http://host.docker.internal:8080
10+
- OIDC_HOST_URL=http://host.docker.internal:8060/rest/isso/oauth2
1311
- OIDC_REDIRECT_URI=http://localhost:9090/fpsak/cb
1412
- REDIS_HOST=redis
1513
links:
1614
- redis
15+
volumes:
16+
- ./dist:/app/fpsak
17+
1718
redis:
1819
image: redis
19-
fpmock2:
20-
image: repo.adeo.no:5443/fpmock2:v201903111706
21-
ports:
22-
- 8060:8060 # HTTP
23-
- 8063:8063 # HTTPS
24-
- 8636:8636 # LDAPS
25-
environment:
26-
- AUTHORIZE_BASE_URL=http://localhost:8060
27-
- AUTOTEST_FPSAK_BASE_URL=http://fpsak:8080
28-
- AUTOTEST_OAUTH2_ISSUER=https://fpmock2:8063/isso/oauth2
29-
- AUTOTEST_VTP_BASE_URL=http://fpmock2:8060
30-
- CUSTOM_KEYSTORE_PASSWORD=changeit
31-
- CUSTOM_KEYSTORE_PATH=/app/testcerts/vtpkeystore.jks
32-
- ENABLE_CUSTOM_TRUSTSTORE=true
33-
- LDAP_PROVIDER_URL=ldaps://fpmock2:8636
34-
- NAV_TRUSTSTORE_PASSWORD=changeit
35-
- NAV_TRUSTSTORE_PATH=/app/testcerts/nav_truststore_path
36-
fpsak:
37-
image: repo.adeo.no:5443/fpsak-for-vtp:v201903111317
38-
restart: on-failure
39-
links:
40-
- fpsak-oracle
41-
- fpmock2
42-
ports:
43-
- 8080:8080
44-
environment:
45-
- DEFAULTDS_URL=jdbc:oracle:thin:@fpsak-oracle:1521/XE
46-
- DVHDS_URL=jdbc:oracle:thin:@fpsak-oracle:1521/XE
47-
fpsak-oracle:
48-
image: repo.adeo.no:5443/fpsak-oracle:v201902281601
49-
shm_size: 1gb
50-
ports:
51-
- 1521:1521

‎docker/Dockerfile

-33
This file was deleted.

‎docker/README.md

-13
This file was deleted.

‎docker/app-t0.yaml

-71
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.