Skip to content
Snippets Groups Projects

Resolve "OpenShift Deployment"

129 files
+ 11022
950
Compare changes
  • Side-by-side
  • Inline

Files

+ 32
31
@@ -18,18 +18,18 @@ author: Martin Weise
@@ -18,18 +18,18 @@ author: Martin Weise
The User Interface is configured in the `runtimeConfig` section of the `nuxt.config.ts` file during build time. For the
The User Interface is configured in the `runtimeConfig` section of the `nuxt.config.ts` file during build time. For the
runtime, you need to override those values through environment variables or by mounting a `.env` file. As a small
runtime, you need to override those values through environment variables or by mounting a `.env` file. As a small
example, you can configure the logo :material-numeric-1-circle-outline: in Figure 2. Make sure you mount the logo as
example, you can configure the logo :material-numeric-1-circle-outline: in [Figure 1](#fig1). Make sure you mount the logo
image as well, in this example we want to mount a custom logo `my_logo.png` into the container and specify the name.
as image as well, in this example we want to mount a custom logo `my_logo.png` into the container and specify the name.
<figure markdown>
<figure id="fig1" markdown>
![Architecture of the UI microservice](../images/screenshots/ui-config-step-1.png){ .img-border }
![Architecture of the UI microservice](../images/screenshots/ui-config-step-1.png){ .img-border }
<figcaption>Figure 1: Architecture of the UI microservice</figcaption>
<figcaption>Figure 1: Architecture of the UI microservice</figcaption>
</figure>
</figure>
=== "Docker Compose"
=== "Docker Compose"
Text values like the version :material-numeric-2-circle-outline: and title :material-numeric-3-circle-outline: can be
Text values like the title :material-numeric-2-circle-outline: can be configured as well via the Nuxt runtime
configured as well via the Nuxt runtime configuration through single environment variables or `.env` files.
configuration through single environment variables or `.env` files.
```yaml title=".env"
```yaml title=".env"
NUXT_PUBLIC_TITLE="My overriden title"
NUXT_PUBLIC_TITLE="My overriden title"
@@ -45,49 +45,50 @@ image as well, in this example we want to mount a custom logo `my_logo.png` into
@@ -45,49 +45,50 @@ image as well, in this example we want to mount a custom logo `my_logo.png` into
=== "Kubernetes"
=== "Kubernetes"
Text values like the version :material-numeric-2-circle-outline: and title :material-numeric-3-circle-outline: can be
Text values like the title :material-numeric-2-circle-outline: can be configured as well via the Nuxt runtime
configured as well via the Nuxt runtime configuration through setting the variables in the `values.yaml` file.
configuration through adding the logo file as `ConfigMap`.
```yaml title="values.yaml"
```console
ui:
kubectl [-n namespace] create configmap gateway-service-config \
public:
--from-file=logo.png
logo: "/my_logo.png"
```
icon: "/favicon.ico"
 
Then you need to mount the configmap into the [Gateway Service](../gateway-service) under `/etc/nginx/assets/assets`.
 
 
```yaml title="dbrepo-ui-custom.yaml"
 
gatewayservice:
extraVolumes:
extraVolumes:
- name: images-map
- name: config-map
configMap:
configMap:
name: ui-config
name: gateway-service-config
extraVolumeMounts:
extraVolumeMounts:
- name: images-map
- name: config-map
mountPath: /static/
mountPath: /etc/nginx/assets/assets
```
```
To work, you need to mount the `my_logo.png` file into the dbrepo-ui deployment via a ConfigMap and Volumes. For this,
All files mounted that way are accessible through svc/gateway-service:80 (or ingress if you enabled it) with prefix
encode the files in base64 with `cat my_logo.png | base64`.
`/assets`, e.g. `https://<hostname>/assets/logo.png`. Therefore, set the logo path:
```yaml title="dbrepo-ui-custom.yaml"
apiVersion: v1
```yaml title="values.yaml"
kind: ConfigMap
ui:
metadata:
public:
name: ui-config
api:
binaryData:
logo: "https://<hostname>/assets/logo.png"
my_logo.png: |
...
<base64>
favicon.ico: |
<base64>
```
```
### Architecture
### Architecture
The server-client architecture of the User Interface is shown in [Figure 3](#fig3), it is supposed to help debug the
The server-client architecture of the User Interface is shown in [Figure 2](#fig2), it is supposed to help debug the
User Interface on development.
User Interface on development.
<figure id="fig3" markdown>
<figure id="fig2" markdown>
![Architecture of the UI microservice](../images/architecture-ui.svg)
![Architecture of the UI microservice](../images/architecture-ui.svg)
<figcaption>Figure 2: Architecture of the User Interface</figcaption>
<figcaption>Figure 2: Architecture of the User Interface</figcaption>
</figure>
</figure>
* Runtime: [Bun 1+](https://bun.sh/) (preferred), *alternatively* Node.js 18+
* Runtime: Node.js 22 LTS
* Builder: [Vite](https://vitejs.dev/)
* Builder: [Vite](https://vitejs.dev/)
* Server: [Nuxt.js 3+](https://nuxt.com/)
* Server: [Nuxt.js 3+](https://nuxt.com/)
* Components: [Vue.js 3+](https://vuejs.org/)
* Components: [Vue.js 3+](https://vuejs.org/)
Loading