-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
1,259 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
theme-build/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]" | ||
|
||
|
@@ -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 | ||
|
||
|
@@ -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 \ | ||
|
@@ -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 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.