Skip to content

Commit c21542a

Browse files
committed
release 0.3.0
2 parents 9d64785 + 5ccc284 commit c21542a

122 files changed

Lines changed: 48870 additions & 14207 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docker.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
sw_version_tag=false
3737
if [[ "${ref_name}" == "master" || "${ref_name}" == "develop" ]]; then sw_version_tag=true; fi
3838
echo "ENABLE_SOFTWARE_VERSION_TAG=${sw_version_tag}" >> $GITHUB_ENV
39+
cp package.json{,.orig} && jq --arg sw_ver "${sw_version}.build${{ github.run_number }}" '.version = $sw_ver' package.json.orig > package.json
3940
4041
# Extract Docker metadata
4142
- name: Extract Docker metadata

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ site](https://crs4.github.io/life_monitor) for more information.
1616

1717
## Development server
1818

19-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
19+
Run `npm run start:dev` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
2020

2121
## Build
2222

23-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
23+
Run `npm build --configuration production` to build the project. The build artifacts will be stored in the `dist/` directory.
2424

2525
## Further help
2626

@@ -35,5 +35,6 @@ To get more help on the Angular CLI use `ng help` or go check out the [Angular C
3535
</div>
3636
<img alt="EOSC-Life, CRS4, BBMRI-ERIC Logos"
3737
src="https://github.com/crs4/life_monitor/raw/master/docs/footer-logo.svg"
38-
width="350" align="center"/>
38+
width="350" align="center"/>wq
39+
3940
</div>

angular.json

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,19 @@
2222
"main": "src/main.ts",
2323
"polyfills": "src/polyfills.ts",
2424
"tsConfig": "tsconfig.app.json",
25-
"aot": true,
26-
"assets": ["src/favicon.ico", "src/assets"],
25+
"assets": [
26+
"src/favicon.ico",
27+
"src/assets",
28+
"src/manifest.webmanifest"
29+
],
2730
"styles": [
28-
"./node_modules/chart.js/dist/Chart.min.css",
31+
"./node_modules/primeicons/primeicons.css",
32+
"./node_modules/primeng/resources/primeng.min.css",
2933
"./node_modules/bs-stepper/dist/css/bs-stepper.min.css",
3034
"./node_modules/bootstrap-select/dist/css/bootstrap-select.min.css",
3135
"./node_modules/datatables.net-bs4/css/dataTables.bootstrap4.min.css",
3236
"./node_modules/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css",
37+
"src/ngstyles.css",
3338
"src/styles.scss"
3439
],
3540
"scripts": [
@@ -44,7 +49,23 @@
4449
"./node_modules/datatables.net-buttons/js/buttons.html5.min.js",
4550
"./node_modules/datatables.net-buttons/js/buttons.print.min.js",
4651
"./node_modules/datatables.net-buttons/js/buttons.colVis.min.js",
47-
"./node_modules/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js"
52+
"./node_modules/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js",
53+
"./node_modules/chart.js/dist/Chart.js",
54+
"./node_modules/swiped-events/dist/swiped-events.min.js"
55+
],
56+
"vendorChunk": true,
57+
"extractLicenses": false,
58+
"buildOptimizer": false,
59+
"sourceMap": true,
60+
"optimization": false,
61+
"namedChunks": true,
62+
"webWorkerTsConfig": "tsconfig.worker.json",
63+
"serviceWorker": true,
64+
"ngswConfigPath": "ngsw-config.json",
65+
"allowedCommonJsDependencies": [
66+
"deep-equal",
67+
"crypto-js",
68+
"chart.js"
4869
]
4970
},
5071
"configurations": {
@@ -74,8 +95,17 @@
7495
"maximumError": "10kb"
7596
}
7697
]
98+
},
99+
"development": {
100+
"buildOptimizer": false,
101+
"optimization": false,
102+
"vendorChunk": true,
103+
"extractLicenses": false,
104+
"sourceMap": true,
105+
"namedChunks": true
77106
}
78-
}
107+
},
108+
"defaultConfiguration": "development"
79109
},
80110
"serve": {
81111
"builder": "@angular-devkit/build-angular:dev-server",
@@ -85,8 +115,12 @@
85115
"configurations": {
86116
"production": {
87117
"browserTarget": "lifemonitor:build:production"
118+
},
119+
"development": {
120+
"browserTarget": "lifemonitor:build:development"
88121
}
89-
}
122+
},
123+
"defaultConfiguration": "development"
90124
},
91125
"extract-i18n": {
92126
"builder": "@angular-devkit/build-angular:extract-i18n",
@@ -101,9 +135,14 @@
101135
"polyfills": "src/polyfills.ts",
102136
"tsConfig": "tsconfig.spec.json",
103137
"karmaConfig": "karma.conf.js",
104-
"assets": ["src/favicon.ico", "src/assets"],
138+
"assets": [
139+
"src/favicon.ico",
140+
"src/assets",
141+
"src/manifest.webmanifest"
142+
],
105143
"styles": ["src/styles.scss"],
106-
"scripts": []
144+
"scripts": [],
145+
"webWorkerTsConfig": "tsconfig.worker.json"
107146
}
108147
},
109148
"lint": {

docker/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,24 @@ RUN npm install -g @angular/cli@11.2.14 && npm ci
1616
COPY . .
1717

1818
# Build front-end for production deployments
19-
RUN ng build --prod
19+
RUN ng build --configuration production
2020

2121

2222
##############################################################
2323
# target stage: serve angular app through NGINX
2424
##############################################################
25-
FROM nginx:1.21.1
25+
FROM crs4/lifemonitor-web:base
2626

2727
# comment user directive as master process is run as user in OpenShift anyhow
28-
RUN sed -i.bak 's/^user/#user/' /etc/nginx/nginx.conf
28+
# RUN sed -i.bak 's/^user/#user/' /etc/nginx/nginx.conf
2929
# Copy the compiled angular app from the 'frontend-build' stage
3030
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
3131
# Copy NGINX site configuration
3232
COPY --from=builder /app/dist/lifemonitor /app
3333

3434
# Fix permissions
35-
RUN chmod g+rwx /var/cache/nginx /var/run /var/log/nginx
35+
RUN mkdir -p /var/cache/nginx /var/log/nginx \
36+
&& chmod -R g+rwx /var/cache/nginx /var/run/ /var/log/nginx
3637

3738
# Set the working dir
3839
WORKDIR /app

k8s/lifemonitor-web/templates/configmap.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ metadata:
1010
data:
1111
config.json : |-
1212
{
13-
"apiBaseUrl": "{{ .Values.backend.apiUrl }}",
13+
"apiBaseUrl": "https://{{ .Values.externalServerName }}/api",
14+
"socketBaseUrl": "https://{{ .Values.externalServerName }}",
1415
"clientId": "{{ .Values.backend.clientId }}"
1516
}

k8s/lifemonitor-web/templates/deployment.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@ spec:
3030
volumeMounts:
3131
- name: frontend-config
3232
mountPath: /app/assets/config.json
33-
subPath: config.json
33+
subPath: config.json
34+
- name: nginx-config
35+
mountPath: /usr/local/openresty/nginx/conf/nginx.conf
36+
subPath: nginx.conf
37+
- name: nginx-config
38+
mountPath: /etc/nginx/conf.d/webapp.prod.conf
39+
subPath: app.conf
40+
- name: logs-storage
41+
mountPath: /var/log/nginx
42+
3443
# livenessProbe:
3544
# httpGet:
3645
# path: /
@@ -46,6 +55,12 @@ spec:
4655
configMap:
4756
name: {{ include "lifemonitor-web.fullname" . }}-frontend-config
4857
defaultMode: 0644
58+
- name: nginx-config
59+
configMap:
60+
name: {{ include "lifemonitor-web.fullname" . }}-nginx-config
61+
defaultMode: 0644
62+
- name: logs-storage
63+
emptyDir: {}
4964
{{- with .Values.nodeSelector }}
5065
nodeSelector:
5166
{{- toYaml . | nindent 8 }}

0 commit comments

Comments
 (0)