Automate immutable production deployments
Test and publish container images / test (push) Successful in 2m43s
Test and publish container images / publish (push) Successful in 2m56s

This commit is contained in:
BuTzZ
2026-07-29 13:00:50 +02:00
parent 2e84f4eae4
commit 2064570913
34 changed files with 1779 additions and 215 deletions
@@ -0,0 +1,18 @@
[Unit]
Description=Neues Watermaps-Release aus der Gitea Registry deployen
Wants=network-online.target
After=network-online.target docker.service watermaps-volume-setup.service
Requires=docker.service
RequiresMountsFor=/srv/watermaps-data
[Service]
Type=oneshot
WorkingDirectory=/opt/watermaps
Environment=WATERMAPS_ENV_FILE=/opt/watermaps/deploy/.env.production
Environment=WATERMAPS_IMAGES_ENV_FILE=/opt/watermaps/deploy/.env.images
ExecStart=/usr/local/sbin/watermaps-auto-deploy
TimeoutStartSec=12h
UMask=0027
Nice=5
IOSchedulingClass=best-effort
IOSchedulingPriority=5
@@ -0,0 +1,12 @@
[Unit]
Description=Gitea regelmäßig auf ein neues Watermaps-Release prüfen
[Timer]
OnBootSec=3m
OnUnitInactiveSec=1m
RandomizedDelaySec=10s
Persistent=true
Unit=watermaps-auto-deploy.service
[Install]
WantedBy=timers.target
@@ -7,5 +7,7 @@ RequiresMountsFor=/srv/watermaps-data
[Service]
Type=oneshot
WorkingDirectory=/opt/watermaps
ExecStart=/opt/watermaps/deploy/scripts/renew-certificate.sh
WorkingDirectory=/opt/watermaps/current
Environment=WATERMAPS_ENV_FILE=/opt/watermaps/deploy/.env.production
Environment=WATERMAPS_IMAGES_ENV_FILE=/opt/watermaps/deploy/.env.images
ExecStart=/opt/watermaps/current/deploy/scripts/renew-certificate.sh
@@ -7,8 +7,10 @@ RequiresMountsFor=/srv/watermaps-data
[Service]
Type=oneshot
WorkingDirectory=/opt/watermaps
ExecStart=/opt/watermaps/deploy/scripts/update-route-data.sh
WorkingDirectory=/opt/watermaps/current
Environment=WATERMAPS_ENV_FILE=/opt/watermaps/deploy/.env.production
Environment=WATERMAPS_IMAGES_ENV_FILE=/opt/watermaps/deploy/.env.images
ExecStart=/opt/watermaps/current/deploy/scripts/update-route-data.sh
TimeoutStartSec=0
Nice=10
IOSchedulingClass=best-effort