sunders(host): deploy sunders using docker compose
Some checks failed
/ Ansible Lint (push) Failing after 2m29s

https://git.hamburg.ccc.de/CCCHH/sunders
This commit is contained in:
June 2025-11-01 17:53:08 +01:00
commit dc6c7cbfb7
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
7 changed files with 123 additions and 3 deletions

View file

@ -29,6 +29,7 @@ map $host $upstream_acme_challenge_host {
wiki.hamburg.ccc.de 172.31.17.146:31820;
www.hamburg.ccc.de 172.31.17.151:31820;
tickets.hamburg.ccc.de 172.31.17.148:31820;
sunders.hamburg.ccc.de 172.31.17.170:31820;
zammad.hamburg.ccc.de 172.31.17.152:31820;
eh03.easterhegg.eu 172.31.17.151:31820;
eh05.easterhegg.eu 172.31.17.151:31820;

View file

@ -43,6 +43,7 @@ stream {
staging.hamburg.ccc.de 172.31.17.151:8443;
spaceapi.hamburg.ccc.de 172.31.17.151:8443;
tickets.hamburg.ccc.de 172.31.17.148:8443;
sunders.hamburg.ccc.de 172.31.17.170:8443;
zammad.hamburg.ccc.de 172.31.17.152:8443;
c3cat.de 172.31.17.151:8443;
www.c3cat.de 172.31.17.151:8443;

View file

@ -0,0 +1,57 @@
# Source:
# https://git.hamburg.ccc.de/CCCHH/sunders/src/branch/main/docker-compose.yml
services:
db:
image: mariadb:12.0.2
command: --max_allowed_packet=3250585600
environment:
MYSQL_ROOT_PASSWORD: "{{ secret__sunders_db_root_password }}"
MYSQL_DATABASE: camera
MYSQL_USER: camera
MYSQL_PASSWORD: "{{ secret__sunders_db_camera_password }}"
volumes:
- mariadb:/var/lib/mysql
healthcheck:
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-uroot", "-prootpassword"]
interval: 10s
timeout: 5s
start_period: 30s
retries: 5
web:
image: git.hamburg.ccc.de/ccchh/sunders/web:latest
environment:
MYSQL_HOST: db
MYSQL_DB: camera
CAMERA_SELECT_USER: camera_select
CAMERA_SELECT_USER_PASSWORD: "{{ secret__sunders_db_camera_select_password }}"
DEFAULT_ZOOM: 12
DEFAULT_LAT: 0
DEFAULT_LON: 0
DEFAULT_LANGUAGE: en
IMPRESSUM_URL: https://hamburg.ccc.de/imprint/
ports:
- "8080:80"
depends_on:
data_handler:
condition: service_started
data_handler:
image: git.hamburg.ccc.de/ccchh/sunders/data_handler:latest
environment:
MYSQL_HOST: db
MYSQL_DB: camera
MYSQL_USER: root
MYSQL_PASSWORD: "{{ secret__sunders_db_root_password }}"
CAMERA_USER: camera
CAMERA_USER_PASSWORD: "{{ secret__sunders_db_camera_password }}"
CAMERA_SELECT_USER: camera_select
CAMERA_SELECT_USER_PASSWORD: "{{ secret__sunders_db_camera_select_password }}"
depends_on:
db:
condition: service_healthy
restart: true
volumes:
mariadb:

View file

@ -0,0 +1,42 @@
# partly generated 2022-01-08, Mozilla Guideline v5.6, nginx 1.17.7, OpenSSL 1.1.1k, intermediate configuration
# https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1k&guideline=5.6
server {
# Listen on a custom port for the proxy protocol.
listen 8443 ssl http2 proxy_protocol;
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
server_name sunders.hamburg.ccc.de;
ssl_certificate /etc/letsencrypt/live/sunders.hamburg.ccc.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/sunders.hamburg.ccc.de/privkey.pem;
# verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /etc/letsencrypt/live/sunders.hamburg.ccc.de/chain.pem;
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
add_header Strict-Transport-Security "max-age=63072000" always;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Port 443;
# This is https in any case.
proxy_set_header X-Forwarded-Proto https;
# Hide the X-Forwarded header.
proxy_hide_header X-Forwarded;
# Assume we are the only Reverse Proxy (well using Proxy Protocol, but that
# is transparent).
# Also provide "_hidden" for by, since it's not relevant.
proxy_set_header Forwarded "for=$remote_addr;proto=https;host=$host;by=_hidden";
location / {
proxy_pass http://127.0.0.1:8080/;
}
}