Skip to content

Commit

Permalink
Merge branch 'release/v1.26.1-9'
Browse files Browse the repository at this point in the history
  • Loading branch information
sklein94 authored and cesmarvin committed Sep 13, 2024
2 parents 02018ae + f2823e8 commit a15c15d
Show file tree
Hide file tree
Showing 26 changed files with 1,259 additions and 223 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme-build/node_modules
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,5 @@ modules.xml
.nfs*

# End of https://www.toptal.com/developers/gitignore/api/linux,go,intellij+all

theme-build/node_modules
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.26.1-9] - 2024-09-13
### Changed
- [#107] Redesign error-pages
- Change UI language of the error-pages to german

## [v1.26.1-8] - 2024-09-04
### Fixed
- Fix problems with content security policies (CSP) caused by whitelabeling
Expand Down
34 changes: 23 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
FROM node:lts-alpine as templating

ENV WORKDIR=/template \
# Used in template to invalidate caches - do not remove. The release script will auto update this line
VERSION="1.26.1-9"

RUN mkdir -p ${WORKDIR}
WORKDIR ${WORKDIR}

COPY theme-build ${WORKDIR}/
COPY resources ${WORKDIR}/resources

RUN yarn install
RUN node template-colors.js ${WORKDIR}/resources/var/www/html/styles/default.css.tpl ${WORKDIR}/build/default.css
RUN node template-error-pages.js ${WORKDIR}/resources/var/www/html/errors/error-page.html.tpl ${WORKDIR}/build/errors

FROM registry.cloudogu.com/official/base:3.20.2-1 as builder
LABEL maintainer="[email protected]"

Expand All @@ -9,9 +25,7 @@ ENV NGINX_VERSION=1.26.1 \
WARP_MENU_VERSION=2.0.0 \
WARP_MENU_TAR_SHA256="51a1010ec0f82b634999e48976d7fec98e6eb574a4401a841cd53f8cd0e14040" \
CES_ABOUT_VERSION="0.5.0" \
CES_ABOUT_TAR_SHA256="c4664340a248d9c2d9333a9a9df7aa9141ebeb40c051d65f78c57f2439b6f07d" \
CES_THEME_VERSION=0.7.0 \
CES_THEME_TAR_SHA256="d3c8ba654cdaccff8fa3202f3958ac0c61156fb25a288d6008354fae75227941"
CES_ABOUT_TAR_SHA256="c4664340a248d9c2d9333a9a9df7aa9141ebeb40c051d65f78c57f2439b6f07d"

WORKDIR /build

Expand Down Expand Up @@ -51,20 +65,14 @@ RUN wget --progress=bar:force:noscroll -O /tmp/warp.zip https://github.com/cloud
&& echo "${WARP_MENU_TAR_SHA256} */tmp/warp.zip" | sha256sum -c - \
&& unzip /tmp/warp.zip -d /build/var/www/html

# install custom error pages
RUN wget --progress=bar:force:noscroll -O /tmp/theme.zip https://github.com/cloudogu/ces-theme/archive/v${CES_THEME_VERSION}.zip \
&& echo "${CES_THEME_TAR_SHA256} */tmp/theme.zip" | sha256sum -c - \
&& unzip /tmp/theme.zip -d /tmp/theme \
&& cp -r /tmp/theme/ces-theme-${CES_THEME_VERSION}/dist/errors /build/var/www/html

FROM registry.cloudogu.com/official/base:3.20.2-1
LABEL maintainer="[email protected]" \
NAME="official/nginx" \
VERSION="1.26.1-8"
VERSION="1.26.1-9"

ENV CES_MAINTENANCE_MODE=false \
# Used in template to invalidate caches - do not remove. The release script will auto update this line
VERSION="1.26.1-8"
VERSION="1.26.1-9"

RUN set -x -o errexit \
&& set -o nounset \
Expand All @@ -81,6 +89,10 @@ COPY resources /
COPY --from=builder /usr/sbin/nginx /usr/sbin/nginx
COPY --from=builder /build /

# copy templated files
COPY --from=templating /template/build/default.css /var/www/html/styles/default.css
COPY --from=templating /template/build/errors /var/www/html/errors

# redirect logs
# cannot be done via builder container as symlinks cannot get copied
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
Expand Down
27 changes: 27 additions & 0 deletions docs/dev/ces-theme_de.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# CES-Theme-Integration

Im Nginx-Dogu wird das [CES-Theme-Tailwind][ces-theme-tailwind] an eingebunden um die allgemeine CES-Styles im Nginx-Dogu bereitzustellen.

## Templating
Im Ordner [theme-build](../../theme-build) ist eine NodeJS-projekt definiert, das das [CES-Theme-Tailwind][ces-theme-tailwind] inkludiert. <!-- markdown-link-check-disable-line -->

### Default-Styles
Die Default-Styles werden vom nginx als `default.css` in jede HTML-Seite eingebunden.
Diese Styles sind in der Datei [default.css.tpl](../../resources/var/www/html/styles/default.css.tpl) definiert. <!-- markdown-link-check-disable-line -->
Dabei werden die Farb-Variablen als CSS-Custom-Properties aus dem [CES-Theme-Tailwind][ces-theme-tailwind] inkludiert.

Mit `yarn template-default-css` wird aus der Template-Datei die `default.css` mit allen Farb-Variablen generiert.


### Error-Pages
Die Error-Pages im Nginx-Dogu sind alle gleich aufgebaut und unterscheiden sich nur durch einzelne Texte und Bilder.
Aus diesem Grund gibt es auch nur ein Template für die Error-Pages: [error-page.html.tpl](../../resources/var/www/html/errors/error-page.html.tpl). <!-- markdown-link-check-disable-line -->

Aus diesem Template werden mit `yarn template-error-pages` die error-pages generiert.

Die Konfiguration der einzelnen Error-Pages ist in der Datei [error-pages.json](../../theme-build/error-pages.json) zu finden. <!-- markdown-link-check-disable-line -->




[ces-theme-tailwind]: https://github.com/cloudogu/ces-theme-tailwind/
26 changes: 26 additions & 0 deletions docs/dev/ces-theme_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# CES-Theme-Integration

The [CES-Theme-Tailwind][ces-theme-tailwind] is integrated in the Nginx-Dogu to provide the general CES styles in the Nginx-Dogu.

## Templating
A NodeJS project is defined in the [theme-build](../../theme-build) folder, which includes the [CES-Theme-Tailwind][ces-theme-tailwind]. <!-- markdown-link-check-disable-line -->

### Default styles
The default styles are integrated into every HTML page by nginx as `default.css`.
These styles are defined in the file [default.css.tpl](../../resources/var/www/html/styles/default.css.tpl). <!-- markdown-link-check-disable-line -->
The color variables are included as CSS custom properties from the [CES-Theme-Tailwind][ces-theme-tailwind].

With `yarn template-default-css` the `default.css` with all color variables is generated from the template file.

### Error pages
The error pages in the Nginx-Dogu all have the same structure and only differ in individual texts and images.
For this reason, there is only one template for the error pages: [error-page.html.tpl](../../resources/var/www/html/errors/error-page.html.tpl). <!-- markdown-link-check-disable-line -->

The error pages are generated from this template with `yarn template-error-pages`.

The configuration of the individual error pages can be found in the file [error-pages.json](../../theme-build/error-pages.json). <!-- markdown-link-check-disable-line -->




[ces-theme-tailwind]: https://github.com/cloudogu/ces-theme-tailwind/
5 changes: 5 additions & 0 deletions docs/gui/release_notes_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Im Folgenden finden Sie die Release Notes für das Nginx-Dogu.

Technische Details zu einem Release finden Sie im zugehörigen [Changelog](https://docs.cloudogu.com/de/docs/dogus/nginx/CHANGELOG/).

## Release 1.26.1-7

* Verbesserung der Barrierefreiheit der Fehlerseiten durch Hinzufügen des neuen Designs
* Die Fehlerseiten jetzt über das Whitelabeling-Dogu whitelabelbar

## Release 1.26.1-6

* Verbesserung der Barrierefreiheit des Warp-Menüs durch Hinzufügen des neuen Designs
Expand Down
5 changes: 5 additions & 0 deletions docs/gui/release_notes_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Below you will find the release notes for the Nginx-Dogu.

Technical details on a release can be found in the corresponding [Changelog](https://docs.cloudogu.com/de/docs/dogus/nginx/CHANGELOG/).

## Release 1.26.1-7

* Improved accessibility of the error pages by adding the new design
* The error pages can now be whitelabeled via the Whitelabeling-Dogu

## Release 1.26.1-6

* Improved accessibility of the warp menu by adding the new design
Expand Down
2 changes: 1 addition & 1 deletion dogu.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Name": "official/nginx",
"Version": "1.26.1-8",
"Version": "1.26.1-9",
"DisplayName": "Nginx",
"Description": "Nginx WebServer.",
"Logo": "https://cloudogu.com/images/dogus/nginx.png",
Expand Down
6 changes: 3 additions & 3 deletions resources/etc/ces-confd/config.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ maintenance:
source:
path: /config/_global/maintenance
default:
title: Maintenance
text: The EcoSystem is currently in maintenance mode
title: Wartungsmodus
text: Das EcoSystem ist aktuell nicht erreichbar - Bitte warten Sie
target: /var/www/html/errors/503.html
template: /etc/ces-confd/templates/maintenance.html.tpl
template: /var/www/html/errors/maintenance.html.tpl

32 changes: 0 additions & 32 deletions resources/etc/ces-confd/templates/maintenance.html.tpl

This file was deleted.

131 changes: 0 additions & 131 deletions resources/var/www/html/errors/css/dogu-starting.css

This file was deleted.

Loading

0 comments on commit a15c15d

Please sign in to comment.