Skip to content

Commit a7caeb4

Browse files
Marco Bergencesmarvin
authored andcommitted
Merge branch 'release/v0.1.0'
2 parents 4aeabee + eae30f8 commit a7caeb4

File tree

155 files changed

+16846
-102
lines changed

Some content is hidden

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

155 files changed

+16846
-102
lines changed

.env.template

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Usage:
2+
# 1. Copy this file as `.env` into your project
3+
# 2. Adapt the information below with the your personal data.
4+
# 3. INFO: escape special characters like # with \
5+
#
6+
# The file `.env` is ignored by git. Note: DO NOT COMMIT your personal data.
7+
8+
# It is necessary to set the stage to `development` when developing locally (optional)
9+
#export STAGE=development
10+
export LOG_LEVEL=debug
11+
export NAMESPACE=$(shell kubectl config view --minify -o jsonpath='{..namespace}')
12+
13+
#export RUNTIME_ENV=remote
14+
#KUBE_CONTEXT_NAME=my-test-cluster-ctx

.gitignore

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
# If you prefer the allow list template instead of the deny list, see community template:
2-
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3-
#
41
# Binaries for programs and plugins
5-
*.exe
6-
*.exe~
7-
*.dll
82
*.so
93
*.dylib
4+
.bin
105

11-
# Test binary, built with `go test -c`
6+
# Test binary, build with `go test -c`
127
*.test
138

14-
# Code coverage profiles and other test artifacts
9+
# Output of the go coverage tool, specifically when used with LiteIDE
1510
*.out
16-
coverage.*
17-
*.coverprofile
18-
profile.cov
11+
target
1912

20-
# Dependency directories (remove the comment below to include it)
21-
# vendor/
13+
# Kubernetes Generated files - skip generated files, except for vendored files
14+
!vendor/**/zz_generated.*
15+
vendor
2216

23-
# Go workspace file
24-
go.work
25-
go.work.sum
17+
# editor and IDE paraphernalia
18+
.idea
19+
*.swp
20+
*.swo
21+
.code
22+
*~
2623

27-
# env file
24+
# ignore personal information
25+
.myenv
26+
.netrc
27+
28+
# Makefiles
2829
.env
2930

30-
# Editor/IDE
31-
# .idea/
32-
# .vscode/
31+
# Strange content.json folder generated by the cesapp/cesapp-lib
32+
cdb4ee2aea69cc6a83331bbe96dc2caa9a299d21329efb0336fc02a82e1839a8/

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# k8s-ces-assets Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
## [v0.1.0] - 2025-09-12
10+
### Added
11+
- [#1] initial project structure
12+
- [#2] warp-menu generation
13+
- [#3] maintenancemode handling

Dockerfile

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
FROM node:lts-alpine AS templating
2+
3+
ENV WORKDIR=/template
4+
5+
RUN mkdir -p ${WORKDIR}
6+
WORKDIR ${WORKDIR}
7+
8+
COPY theme-build ${WORKDIR}/
9+
COPY resources ${WORKDIR}/resources
10+
11+
RUN yarn install
12+
RUN node template-colors.js ${WORKDIR}/resources/var/www/html/styles/default.css.tpl ${WORKDIR}/build/default.css
13+
RUN node template-error-pages.js ${WORKDIR}/resources/var/www/html/errors/error-page.html.tpl ${WORKDIR}/build/errors
14+
15+
16+
FROM alpine:3.20 AS builder
17+
18+
# dockerfile is based on https://github.com/dockerfile/nginx and https://github.com/bellycard/docker-loadbalancer
19+
ENV NGINX_VERSION 1.26.3
20+
ENV NGINX_TAR_SHA256="69ee2b237744036e61d24b836668aad3040dda461fe6f570f1787eab570c75aa"
21+
22+
COPY nginx-build /
23+
24+
RUN set -x -o errexit \
25+
&& set -o nounset \
26+
&& set -o pipefail \
27+
&& apk update \
28+
&& apk upgrade \
29+
&& apk --update add bash openssl-dev pcre-dev zlib-dev wget build-base \
30+
&& mkdir /build \
31+
&& cd /build \
32+
&& wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz \
33+
&& echo "${NGINX_TAR_SHA256} *nginx-${NGINX_VERSION}.tar.gz" | sha256sum -c - \
34+
&& tar -zxvf nginx-${NGINX_VERSION}.tar.gz \
35+
&& cd /build/nginx-${NGINX_VERSION} \
36+
&& /build.sh \
37+
&& rm -rf /var/cache/apk/* /build
38+
39+
FROM alpine:3.20
40+
41+
LABEL maintainer="hello@cloudogu.com"
42+
43+
ENV WARP_MENU_VERSION=2.0.3 \
44+
WARP_MENU_TAR_SHA256="8dfd023579728b6786bdb4664fb6d3e629717d9d2d27cdd4b365f9a844f1858c" \
45+
CES_ABOUT_VERSION="0.7.0" \
46+
CES_ABOUT_TAR_SHA256="fcfdfb86dac75d5ae751cc0e8c3436ecee12f0d5ed830897c4f61029ae1df27e" \
47+
# Used in template to invalidate caches - do not remove. The release script will auto update this line
48+
VERSION="0.1.0"
49+
50+
# Install required packages
51+
RUN apk upgrade \
52+
&& apk --update add \
53+
bash \
54+
openssl \
55+
pcre \
56+
musl \
57+
zlib
58+
59+
# add nginx user
60+
RUN adduser nginx -D
61+
62+
# prepare folders
63+
RUN set -x \
64+
&& mkdir -p /var/www/html \
65+
&& mkdir -p /var/www/html/customhtml \
66+
&& mkdir -p /var/log/nginx \
67+
&& mkdir -p /etc/nginx/include.d \
68+
&& mkdir -p /etc/nginx/conf.d
69+
70+
# install ces-about page
71+
RUN wget -O /tmp/ces-about-v${CES_ABOUT_VERSION}.tar.gz https://github.com/cloudogu/ces-about/releases/download/v${CES_ABOUT_VERSION}/ces-about_v${CES_ABOUT_VERSION}.tar.gz \
72+
&& echo "${CES_ABOUT_TAR_SHA256} */tmp/ces-about-v${CES_ABOUT_VERSION}.tar.gz" | sha256sum -c - \
73+
&& tar -xzvf /tmp/ces-about-v${CES_ABOUT_VERSION}.tar.gz -C /var/www/html \
74+
&& mkdir -p /etc/nginx/include.d/ \
75+
&& cp /var/www/html/routes/ces-about-routes.conf /etc/nginx/include.d/ \
76+
&& rm -rf /var/www/html/routes
77+
78+
# install warp menu
79+
RUN wget https://github.com/cloudogu/warp-menu/releases/download/v${WARP_MENU_VERSION}/warp-v${WARP_MENU_VERSION}.zip -q -O /tmp/warp.zip \
80+
&& echo "${WARP_MENU_TAR_SHA256} */tmp/warp.zip" | sha256sum -c - \
81+
&& unzip /tmp/warp.zip -d /var/www/html
82+
83+
# redirect logs
84+
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
85+
&& ln -sf /dev/stderr /var/log/nginx/error.log
86+
87+
# cleanup apk cache
88+
RUN rm -rf /var/cache/apk/*
89+
90+
# copy files
91+
COPY --from=builder /usr/sbin/nginx /usr/sbin/nginx
92+
93+
# copy files
94+
COPY resources /
95+
96+
# copy templated files
97+
COPY --from=templating /template/build/default.css /var/www/html/styles/default.css
98+
COPY --from=templating /template/build/errors /var/www/html/errors
99+
100+
# Volumes are used to avoid writing to containers writable layer https://docs.docker.com/storage/
101+
# Compared to the bind mounted volumes we declare in the dogu.json,
102+
# the volumes declared here are not mounted to the dogu if the container is destroyed/recreated,
103+
# e.g. after a dogu upgrade
104+
VOLUME ["/etc/nginx/app.conf.d", "/var/www/html"]
105+
106+
# Define working directory.
107+
WORKDIR /etc/nginx
108+
109+
# Expose ports.
110+
EXPOSE 80
111+
112+
# Define default command.
113+
ENTRYPOINT ["/startup.sh"]

0 commit comments

Comments
 (0)