Skip to content

Commit

Permalink
Release v1.4.0 (#23)
Browse files Browse the repository at this point in the history
* Add helm charts

* Rename to identity portal

* Add portal components

* Fix ci

* Fix ci

* Update configs

* Update keycloak realm

* Revert realm to master

* Add service calls and cookies

* Clear request uri on service change

* Fix cookie delete

* Add more service links

* Update ci

* Update ci

* Fix issue

* Fix ci

* Fix scrollbars

* Add refresh token

* Fix dockerfile

* Add offline access

* Revert offline token

* Add demo workflow

* Fix workflow

* Fix angular config

* Fix dockerfile

* Update README.md

* Update README.md

* Add env variables

* Add configmap
  • Loading branch information
daniel-pimenta-DME authored Feb 23, 2024
1 parent d502bf7 commit 4fcb22e
Show file tree
Hide file tree
Showing 27 changed files with 1,086 additions and 330 deletions.
15 changes: 15 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
IDENTITY_URL="https://identity.keycloak.develop.eoepca.org"
REALM="master"
CLIENT_ID="eoepca-portal"
IDENTITY_API_URL="https://identity.api.develop.eoepca.org"
ADES_URL="https://ades.develop.eoepca.org/ogc-api/processes"
RESOURCE_CATALOGUE_URL="https://resource-catalogue.develop.eoepca.org"
DATA_ACCESS_URL="https://data-access.develop.eoepca.org"
WORKSPACE_URL="https://workspace-api.develop.eoepca.org"
WORKSPACE_DOCS_URL="https://workspace-api.develop.eoepca.org/docs#"
IMAGES_REGISTRY_URL="https://harbor.develop.eoepca.org"
DUMMY_SERVICE_URL="https://identity.dummy-service.develop.eoepca.org"
ACCESS_TOKEN_NAME="auth_user_id"
ACCESS_TOKEN_DOMAIN=".develop.eoepca.org"
REFRESH_TOKEN_NAME="auth_refresh_token"
REFRESH_TOKEN_DOMAIN=".develop.eoepca.org"
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ RUN npm i -g @angular/cli
RUN npm i

COPY . .
ARG CONFIGURATION=develop
RUN ng build --configuration=$CONFIGURATION
RUN ng build

### STAGE 2: Run ###
FROM nginx:stable-alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=build /usr/src/app/dist/* /usr/share/nginx/html
COPY --from=build /usr/src/app/dist/* /usr/share/nginx/html
WORKDIR /start
COPY ./start.sh .
CMD [ "sh", "start.sh" ]
105 changes: 14 additions & 91 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@ngx-env/builder:browser",
"options": {
"outputPath": "dist/eoepca-portal",
"index": "src/index.html",
Expand All @@ -27,12 +27,16 @@
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/config"
],
"styles": [
"src/styles.scss"
],
"scripts": []
"scripts": [],
"ngxEnv": {
"prefix": "EOEPCA_"
}
},
"configurations": {
"production": {
Expand All @@ -48,76 +52,7 @@
"maximumError": "4kb"
}
],
"outputHashing": "all",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.production.ts"
}
]
},
"staging": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.staging.ts"
}
]
},
"demo": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.demo.ts"
}
]
},
"develop": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"outputHashing": "all",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.develop.ts"
}
]
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
Expand All @@ -127,35 +62,22 @@
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@ngx-env/builder:dev-server",
"configurations": {
"production": {
"browserTarget": "eoepca-portal:build:production"
},
"demo": {
"browserTarget": "eoepca-portal:build:demo"
},
"staging": {
"browserTarget": "eoepca-portal:build:staging"
},
"develop": {
"browserTarget": "eoepca-portal:build:develop"
}
},
"defaultConfiguration": "develop"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"builder": "@ngx-env/builder:extract-i18n",
"options": {
"browserTarget": "eoepca-portal:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@ngx-env/builder:karma",
"options": {
"polyfills": [
"zone.js",
Expand All @@ -165,7 +87,8 @@
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/config"
],
"styles": [
"@angular/material/prebuilt-themes/indigo-pink.css",
Expand Down
23 changes: 23 additions & 0 deletions charts/eoepca-portal/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "eoepca-portal.name" . }}
labels:
{{- include "eoepca-portal.labels" . | nindent 4 }}
data:
AUTH_SERVER_URL: "{{ .Values.configMap.auth_server_url }}"
IDENTITY_URL: "{{ .Values.configMap.identity_url }}"
REALM: "{{ .Values.configMap.realm }}"
CLIENT_ID: "{{ .Values.configMap.client_id }}"
IDENTITY_API_URL: "{{ .Values.configMap.identity_api_url }}"
ADES_URL: "{{ .Values.configMap.ades_url }}"
RESOURCE_CATALOGUE_URL: "{{ .Values.configMap.resource_catalogue_url }}"
DATA_ACCESS_URL: "{{ .Values.configMap.data_access_url }}"
WORKSPACE_URL: "{{ .Values.configMap.workspace_url }}"
WORKSPACE_DOCS_URL: "{{ .Values.configMap.workspace_docs_url }}"
IMAGES_REGISTRY_URL: "{{ .Values.configMap.images_registry_url }}"
DUMMY_SERVICE_URL: "{{ .Values.configMap.dummy_service_url }}"
ACCESS_TOKEN_NAME: "{{ .Values.configMap.access_token_name }}"
ACCESS_TOKEN_DOMAIN: "{{ .Values.configMap.access_token_domain }}"
REFRESH_TOKEN_NAME: "{{ .Values.configMap.refresh_token_name }}"
REFRESH_TOKEN_DOMAIN: "{{ .Values.configMap.refresh_token_domain }}"
2 changes: 2 additions & 0 deletions charts/eoepca-portal/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ spec:
{{- with .Values.deployment.extraEnvFrom }}
{{- tpl . $ | nindent 12 }}
{{- end }}
- configMapRef:
name: {{ include "eoepca-portal.name" . }}
ports:
- name: http
containerPort: {{ .Values.deployment.containerPort }}
Expand Down
20 changes: 19 additions & 1 deletion charts/eoepca-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,22 @@ serviceAccount:
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
name: ""

configMap:
auth_server_url: "https://identity.keycloak.develop.eoepca.org"
identity_url: "master"
realm: "eoepca-portal"
client_id: "eoepca-portal"
identity_api_url: "https://identity.api.develop.eoepca.org"
ades_url: "https://ades.develop.eoepca.org/ogc-api/processes"
resource_catalogue_url: "https://resource-catalogue.develop.eoepca.org"
data_access_url: "https://data-access.develop.eoepca.org"
workspace_url: "https://workspace-api.develop.eoepca.org"
workspace_docs_url: "https://workspace-api.develop.eoepca.org/docs#"
images_registry_url: "https://harbor.develop.eoepca.org"
dummy_service_url: "https://identity.dummy-service.develop.eoepca.org"
access_token_name: "auth_user_id"
access_token_domain: ".develop.eoepca.org"
refresh_token_name: "auth_refresh_token"
refresh_token_domain: ".develop.eoepca.org"
20 changes: 17 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,21 @@ services:
eoepca-portal:
build: .
container_name: eoepca-portal
environment:
- CONFIGURATION=develop
ports:
- '80:80'
- '80:80'
environment:
- IDENTITY_URL=${IDENTITY_URL}
- REALM=${REALM}
- CLIENT_ID=${CLIENT_ID}
- IDENTITY_API_URL=${IDENTITY_API_URL}
- ADES_URL=${ADES_URL}
- RESOURCE_CATALOGUE_URL=${RESOURCE_CATALOGUE_URL}
- DATA_ACCESS_URL=${DATA_ACCESS_URL}
- WORKSPACE_URL=${WORKSPACE_URL}
- WORKSPACE_DOCS_URL=${WORKSPACE_DOCS_URL}
- IMAGES_REGISTRY_URL=${IMAGES_REGISTRY_URL}
- DUMMY_SERVICE_URL=${DUMMY_SERVICE_URL}
- ACCESS_TOKEN_NAME=${ACCESS_TOKEN_NAME}
- ACCESS_TOKEN_DOMAIN=${ACCESS_TOKEN_DOMAIN}
- REFRESH_TOKEN_NAME=${REFRESH_TOKEN_NAME}
- REFRESH_TOKEN_DOMAIN=${REFRESH_TOKEN_DOMAIN}
Loading

0 comments on commit 4fcb22e

Please sign in to comment.