commit 9c827c14cdf6f35d97a40d34579c9871633f185f Author: Peter Kurfer Date: Mon Apr 17 16:11:49 2023 +0200 Initial commit diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..566ef3d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,18 @@ +############### +# Directories # +############### + +.concourse/ +public/ +deploy/helm/ +.git/ + +######### +# Files # +######### + +Dockerfile +LICENSE +README.md +.gitignore +.dockerignore \ No newline at end of file diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..2fbb6ef --- /dev/null +++ b/.drone.yml @@ -0,0 +1,19 @@ +--- +kind: pipeline +type: docker +name: default + +steps: + - name: Build image + image: gcr.io/kaniko-project/executor:debug + commands: + - | + echo "{\"auths\": {\"https://code.icb4dc0.de\": {\"auth\" : \"$(printf '%s:%s' $GITEA_USER $GITEA_TOKEN | base64)\" }}}" > /kaniko/.docker/config.json + /kaniko/executor \ + --destination code.icb4dc0.de/buildr/docs:latest \ + --destination code.icb4dc0.de/buildr/docs:$DRONE_COMMIT_SHA \ + --context . + environment: + GITEA_USER: prskr + GITEA_TOKEN: + from_secret: gitea_token \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6fd12db --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# ---> Hugo +# Generated files by hugo +/public/ +/resources/_gen/ +/assets/jsconfig.json +hugo_stats.json + +# Executable may be added to repository +hugo.exe +hugo.darwin +hugo.linux + +# Temporary lock file while building +/.hugo_build.lock diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a25a899 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM docker.io/golang:1.20-alpine as builder + +WORKDIR /tmp + +RUN apk add -U --no-cache hugo git + +WORKDIR /src + +COPY . /src/ + +RUN hugo --minify --environment production --config config.toml + +FROM code.icb4dc0.de/prskr/ci-images/caddy:latest as final + +COPY --from=builder /src/public /usr/share/caddy/docs/ +COPY deploy/caddy/Caddyfile /etc/caddy/Caddyfile + +CMD [ "run", "--config=/etc/caddy/Caddyfile" ] \ No newline at end of file diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..7580011 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1 @@ +title: "{{ replace .Name "-" " " | title }}" date: {{ .Date }} draft: true \ No newline at end of file diff --git a/assets/.gitkeep b/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..bce4925 --- /dev/null +++ b/config.toml @@ -0,0 +1,19 @@ +baseURL = 'https://docs.buildr.icb4dc0.de/' +languageCode = 'en-us' +theme = ['github.com/McShelby/hugo-theme-relearn'] +pluralizelisttitles = false +title = "BuildR" + +[Params] +author = "Peter Kurfer" +description = "BuildR docs" +style= "auto" +copyCodeButton = true +rssAsSocialIcon = true +ordersectionsby = "weight" +themeVariant = "relearn-light" +collapsibleMenu = true + + +[outputs] +home = [ "HTML", "RSS", "JSON"] \ No newline at end of file diff --git a/content/01-installation/01-basics.md b/content/01-installation/01-basics.md new file mode 100644 index 0000000..383c766 --- /dev/null +++ b/content/01-installation/01-basics.md @@ -0,0 +1,11 @@ + +80 B +Markdown ++++ +title = "Basics" +chapter = true +weight = 15 +pre = "1. " ++++ + +# Basics \ No newline at end of file diff --git a/content/01-installation/_index.md b/content/01-installation/_index.md new file mode 100644 index 0000000..6582467 --- /dev/null +++ b/content/01-installation/_index.md @@ -0,0 +1,8 @@ ++++ +title = "Installation" +chapter = true +weight = 10 +pre = "1. " ++++ + +# Installation \ No newline at end of file diff --git a/content/02-getting-started/01-tools.md b/content/02-getting-started/01-tools.md new file mode 100644 index 0000000..da92e57 --- /dev/null +++ b/content/02-getting-started/01-tools.md @@ -0,0 +1,8 @@ ++++ +title = "Tools" +chapter = true +weight = 15 +pre = "1. " ++++ + +# Tools \ No newline at end of file diff --git a/content/02-getting-started/_index.md b/content/02-getting-started/_index.md new file mode 100644 index 0000000..05643b2 --- /dev/null +++ b/content/02-getting-started/_index.md @@ -0,0 +1,6 @@ ++++ +title = "Getting started" +chapter = true +weight = 20 +pre = "2. " ++++ \ No newline at end of file diff --git a/content/03-components/_index.md b/content/03-components/_index.md new file mode 100644 index 0000000..f91b658 --- /dev/null +++ b/content/03-components/_index.md @@ -0,0 +1,6 @@ ++++ +title = "Components" +chapter = true +weight = 30 +pre = "3. " ++++ \ No newline at end of file diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..af1cfc6 --- /dev/null +++ b/content/_index.md @@ -0,0 +1 @@ +# BuildR documentation \ No newline at end of file diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/deploy/caddy/Caddyfile b/deploy/caddy/Caddyfile new file mode 100644 index 0000000..9bf22af --- /dev/null +++ b/deploy/caddy/Caddyfile @@ -0,0 +1,8 @@ +:3000 + +encode zstd gzip + +file_server { + index index.html + root /usr/share/caddy/docs +} diff --git a/deploy/k8s/deployment.yaml b/deploy/k8s/deployment.yaml new file mode 100644 index 0000000..3818772 --- /dev/null +++ b/deploy/k8s/deployment.yaml @@ -0,0 +1,59 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: buildr-docs + namespace: buildr + labels: + app.kubernetes.io/name: buildr-docs +spec: + replicas: 2 + selector: + matchLabels: + app.kubernetes.io/name: buildr-docs + template: + metadata: + labels: + app.kubernetes.io/name: buildr-docs + spec: + containers: + - name: inetmock-docs + image: code.icb4dc0.de/buildr/docs + ports: + - name: http + containerPort: 3000 + protocol: TCP + resources: + limits: + cpu: 100m + memory: 60Mi + requests: + cpu: 50m + memory: 20Mi + livenessProbe: + httpGet: + path: / + port: http + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + readinessProbe: + httpGet: + path: / + port: http + scheme: HTTP + timeoutSeconds: 1 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + imagePullPolicy: IfNotPresent + securityContext: + capabilities: + drop: + - ALL + runAsUser: 65532 + runAsNonRoot: true + readOnlyRootFilesystem: true + allowPrivilegeEscalation: false \ No newline at end of file diff --git a/deploy/k8s/ingress.yaml b/deploy/k8s/ingress.yaml new file mode 100644 index 0000000..a70400d --- /dev/null +++ b/deploy/k8s/ingress.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: buildr-docs + namespace: buildr + labels: + app.kubernetes.io/name: buildr-docs +spec: + ingressClassName: traefik + rules: + - host: docs.buildr.icb4dc0.de + http: + paths: + - path: / + pathType: ImplementationSpecific + backend: + service: + name: buildr-docs + port: + number: 3000 diff --git a/deploy/k8s/kustomization.yaml b/deploy/k8s/kustomization.yaml new file mode 100644 index 0000000..4ea1bcc --- /dev/null +++ b/deploy/k8s/kustomization.yaml @@ -0,0 +1,2 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization diff --git a/deploy/k8s/service.yaml b/deploy/k8s/service.yaml new file mode 100644 index 0000000..c0713e0 --- /dev/null +++ b/deploy/k8s/service.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: buildr-docs + namespace: buildr + labels: + app.kubernetes.io/name: buildr-docs +spec: + ports: + - name: http + protocol: TCP + port: 3000 + targetPort: http + selector: + app.kubernetes.io/name: buildr-docs + type: ClusterIP \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e4f5581 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module code.icb4dc0.de/buildr/docs + +go 1.20 + +require github.com/McShelby/hugo-theme-relearn v0.0.0-20230328175528-8d474ed3b16b // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..905da92 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/McShelby/hugo-theme-relearn v0.0.0-20230328175528-8d474ed3b16b h1:jxQtSeFMg84UClWIS1sxQXCraGeGmTsq+SBFHvaN4/k= +github.com/McShelby/hugo-theme-relearn v0.0.0-20230328175528-8d474ed3b16b/go.mod h1:mKQQdxZNIlLvAj8X3tMq+RzntIJSr9z7XdzuMomt0IM= diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html new file mode 100644 index 0000000..abeac88 --- /dev/null +++ b/layouts/partials/logo.html @@ -0,0 +1,54 @@ + + \ No newline at end of file