Automate immutable production deployments
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user