1
0
mirror of https://github.com/tommytran732/Fedora-CoreOS-Ignition synced 2024-11-22 01:11:34 -05:00

Update docker-compose-updater

Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
Tommy 2024-05-03 14:55:36 -07:00
parent 147945e752
commit 2e0f0719cd
Signed by: Tomster
GPG Key ID: 555C902A34EC968F
2 changed files with 13 additions and 10 deletions

View File

@ -247,14 +247,14 @@
"name": "gvisor-updater.service"
},
{
"contents": "[Unit]\nDescription=Update containers with Docker-Compose\nRequires=network-online.target\nRequires=docker.service\n\n[Service]\nWorkingDirectory=/path/to/directory\nType=oneshot\nExecStart=/usr/bin/docker image prune -f\n#ExecStart=/usr/bin/git pull\nExecStart=/usr/bin/docker compose pull\nExecStart=/usr/bin/docker compose up -d\n",
"contents": "[Unit]\nDescription=Docker Compose Updater for /srv/%I\nAfter=docker.service\nRequires=network-online.target\nRequires=docker.service\n\n[Service]\nType=oneshot\nUser=root\nGroup=root\nWorkingDirectory=/srv/%i\nExecStart=/usr/bin/docker image prune -f -a --filter 'until=240h'\n#ExecStart=/usr/bin/git pull\nExecStart=/usr/bin/docker compose pull\nExecStart=/usr/bin/docker compose up -d\n",
"enabled": false,
"name": "docker-compose-updater.service"
"name": "docker-compose-updater@.service"
},
{
"contents": "[Unit]\nDescription=Run docker-compose-updater once a week, 15 minutes after OS update\n\n[Timer]\nOnCalendar=Fri 0:15\nPersistent=true\n\n[Install]\nWantedBy=timers.target\n",
"contents": "[Unit]\nDescription=Run docker-compose-updater for /srv/%I once a week, 15 mintues after OS updates\n\n[Timer]\nOnCalendar=Fri 0:15\nPersistent=true\n\n[Install]\nWantedBy=timers.target\n",
"enabled": false,
"name": "docker-compose-updater.timer"
"name": "docker-compose-updater@.timer"
},
{
"enabled": true,

View File

@ -125,26 +125,29 @@ systemd:
[Install]
WantedBy=multi-user.target
- name: docker-compose-updater.service
- name: docker-compose-updater@.service
enabled: false
contents: |
[Unit]
Description=Update containers with Docker-Compose
Description=Docker Compose Updater for /srv/%I
After=docker.service
Requires=network-online.target
Requires=docker.service
[Service]
WorkingDirectory=/path/to/directory
Type=oneshot
ExecStart=/usr/bin/docker image prune -f
User=root
Group=root
WorkingDirectory=/srv/%i
ExecStart=/usr/bin/docker image prune -f -a --filter 'until=240h'
#ExecStart=/usr/bin/git pull
ExecStart=/usr/bin/docker compose pull
ExecStart=/usr/bin/docker compose up -d
- name: docker-compose-updater.timer
- name: docker-compose-updater@.timer
enabled: false
contents: |
[Unit]
Description=Run docker-compose-updater once a week, 15 minutes after OS update
Description=Run docker-compose-updater for /srv/%I once a week, 15 mintues after OS updates
[Timer]
OnCalendar=Fri 0:15