Compare commits

...

5 commits

Author SHA1 Message Date
d8c5e934d9 Update docker.io/library/postgres Docker tag to v18
All checks were successful
/ build (pull_request) Successful in 26s
/ Ansible Lint (pull_request) Successful in 2m27s
/ Ansible Lint (push) Successful in 5m17s
2026-05-19 16:46:38 +00:00
197b9c297c docs: fix code blocks overflowing and add syntax highlighting
All checks were successful
/ Ansible Lint (pull_request) Successful in 2m38s
/ build (pull_request) Successful in 25s
/ cleanup-staging (pull_request) Successful in 2s
/ build (push) Successful in 23s
/ Ansible Lint (push) Successful in 4m45s
Without these options code blocks would overflow. See:
https://github.com/asiffer/mkdocs-shadcn/issues/57
And it also provides nice syntax highlighting.
2026-05-19 18:33:03 +02:00
abcc144711 docs: add index page 2026-05-19 18:33:03 +02:00
31cc60c648 docs: add mkdocs config and CI for building infra-docs website
Heavily inspired by: https://forgejo.c3voc.de/voc/av-docs
2026-05-19 18:33:03 +02:00
a93d22fb05 add configuration for infra-docs and infra-docs staging 2026-05-19 18:33:03 +02:00
11 changed files with 134 additions and 3 deletions

View file

@ -0,0 +1,24 @@
on:
pull_request:
types:
- closed
jobs:
cleanup-staging:
runs-on: docker
container:
image: code.forgejo.org/oci/node:22-bookworm
steps:
- name: Pipeline info PR
run: |
echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}"
- name: Staging Deployment - Prepare keys
run: |
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
chmod 400 deploykey.priv
echo "${{ vars.SSH_KNOWN_HOSTS }}" > ./known_hosts
- name: Staging Deployment - Remove PR from staging
run: |
ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts' infra-docs-deploy@public-web-static.hosts.hamburg.ccc.de -t "rm -r /var/www/staging.infra-docs.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/"

View file

@ -0,0 +1,75 @@
on:
push:
branches:
- main
pull_request:
env:
TZ: Europe/Berlin
jobs:
build:
runs-on: docker
container:
image: docker.io/library/python:3.14-trixie
steps:
- name: Pipeline info
run: |
echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}"
- name: Install packages
run: |
apt update
apt -y install nodejs git rsync openssh-client
pip install --upgrade pip
- uses: actions/checkout@v6
- name: Install Python packages
run: |
pip install -r docs_requirements.txt
- name: Build website - prod
if: github.event_name != 'pull_request'
run: |
mkdocs build
- name: Build website - staging
if: github.event_name == 'pull_request'
run: |
sed -i "s#site_url: https://infra-docs.hamburg.ccc.de#site_url: https://staging.infra-docs.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/#" mkdocs.yml
mkdocs build
- name: Deploy - Prepare keys
run: |
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
chmod 400 deploykey.priv
echo "${{ vars.SSH_KNOWN_HOSTS }}" > ./known_hosts
- name: Deploy - Upload PR to staging
if: github.event_name == 'pull_request'
run: |
echo "Deploying to staging.infra-docs.hamburg.ccc.de/pr${{ github.event.pull_request.number }}"
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" site/ infra-docs-deploy@public-web-static.hosts.hamburg.ccc.de:/var/www/staging.infra-docs.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/
- name: Deploy - Add comment to PR with staging URL
if: github.event_name == 'pull_request' && github.event.action == 'opened'
run: |
curl \
-X POST \
${{ github.event.pull_request.base.repo.url }}/issues/${{ github.event.pull_request.number }}/comments \
-H "Content-Type: application/json" \
-H "Authorization: token $FORGEJO_TOKEN" \
--data '{ "body": "You can view your changes at https://staging.infra-docs.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/" }'
- name: Deploy - Upload to prod
if: github.event_name != 'pull_request'
run: |
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" site/ infra-docs-deploy@public-web-static.hosts.hamburg.ccc.de:/var/www/infra-docs.hamburg.ccc.de/
- uses: actions/upload-artifact@v3
if: github.event_name == 'pull_request'
with:
name: docs-build
path: site/
retention-days: 3

3
docs/index.md Normal file
View file

@ -0,0 +1,3 @@
# CCCHH Infrastructure Documentation
Home for CCCHH infrastructure documentation.

3
docs_requirements.txt Normal file
View file

@ -0,0 +1,3 @@
mkdocs
mkdocs-shadcn
pygments

View file

@ -1,7 +1,7 @@
# renovate: datasource=docker depName=git.hamburg.ccc.de/ccchh/oci-images/nextcloud
nextcloud__version: 32
# renovate: datasource=docker depName=docker.io/library/postgres
nextcloud__postgres_version: 15.17
nextcloud__postgres_version: 18.4
nextcloud__fqdn: cloud.hamburg.ccc.de
nextcloud__data_dir: /data/nextcloud
nextcloud__extra_configuration: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/cloud/nextcloud/extra_configuration.config.php.j2') }}"

20
mkdocs.yml Normal file
View file

@ -0,0 +1,20 @@
site_name: CCCHH Infrastructure Documentation
site_url: https://infra-docs.hamburg.ccc.de
repo_url: https://git.hamburg.ccc.de/CCCHH/ansible-infra
copyright: MIT
markdown_extensions:
- smarty
- admonition
- attr_list
- codehilite
theme:
name: shadcn
show_title: true
show_stargazers: false
pygments_style:
light: shadcn-light
dark: github-dark
icon: oui:documentation
topbar_sections: false
show_datetime: false

View file

@ -287,6 +287,8 @@ spaceapiccc IN CNAME public-reverse-proxy
acmedns IN CNAME public-reverse-proxy
cpuccc IN CNAME public-reverse-proxy
did IN CNAME public-reverse-proxy
infra-docs IN CNAME public-reverse-proxy
staging.infra-docs IN CNAME public-reverse-proxy
auth.acmedns IN NS acmedns.hosts.hamburg.ccc.de.

View file

@ -62,7 +62,7 @@ services:
- POSTGRES_DB=mailmandb
- POSTGRES_USER=mailman
- "POSTGRES_PASSWORD={{ secret__lists__postgres_password }}"
image: docker.io/library/postgres:12-alpine
image: docker.io/library/postgres:18-alpine
volumes:
- /opt/mailman/database:/var/lib/postgresql/data
networks:

View file

@ -3,7 +3,7 @@
services:
database:
image: docker.io/library/postgres:15-alpine
image: docker.io/library/postgres:18-alpine
environment:
- "POSTGRES_USER=pretalx"
- "POSTGRES_PASSWORD={{ secret__pretalx_db_password }}"

View file

@ -85,6 +85,8 @@ map $host $upstream_acme_challenge_host {
diday.org public-web-static.hosts.hamburg.ccc.de:31820;
docs.c3voc.de public-web-static.hosts.hamburg.ccc.de:31820;
staging.docs.c3voc.de public-web-static.hosts.hamburg.ccc.de:31820;
infra-docs.hamburg.ccc.de public-web-static.hosts.hamburg.ccc.de:31820;
staging.infra-docs.hamburg.ccc.de public-web-static.hosts.hamburg.ccc.de:31820;
default "";
}

View file

@ -108,6 +108,8 @@ stream {
*.staging.diday.org public-web-static.hosts.hamburg.ccc.de:8443;
docs.c3voc.de public-web-static.hosts.hamburg.ccc.de:8443;
staging.docs.c3voc.de public-web-static.hosts.hamburg.ccc.de:8443;
infra-docs.hamburg.ccc.de public-web-static.hosts.hamburg.ccc.de:8443;
staging.infra-docs.hamburg.ccc.de public-web-static.hosts.hamburg.ccc.de:8443;
}
server {