mirror of
https://github.com/tommytran732/Fedora-CoreOS-Ignition
synced 2024-11-22 09:21:32 -05:00
Update docker-compose-updater
Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
parent
147945e752
commit
2e0f0719cd
@ -247,14 +247,14 @@
|
|||||||
"name": "gvisor-updater.service"
|
"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,
|
"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,
|
"enabled": false,
|
||||||
"name": "docker-compose-updater.timer"
|
"name": "docker-compose-updater@.timer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
|
@ -125,26 +125,29 @@ systemd:
|
|||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
- name: docker-compose-updater.service
|
- name: docker-compose-updater@.service
|
||||||
enabled: false
|
enabled: false
|
||||||
contents: |
|
contents: |
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Update containers with Docker-Compose
|
Description=Docker Compose Updater for /srv/%I
|
||||||
|
After=docker.service
|
||||||
Requires=network-online.target
|
Requires=network-online.target
|
||||||
Requires=docker.service
|
Requires=docker.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/path/to/directory
|
|
||||||
Type=oneshot
|
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/git pull
|
||||||
ExecStart=/usr/bin/docker compose pull
|
ExecStart=/usr/bin/docker compose pull
|
||||||
ExecStart=/usr/bin/docker compose up -d
|
ExecStart=/usr/bin/docker compose up -d
|
||||||
- name: docker-compose-updater.timer
|
- name: docker-compose-updater@.timer
|
||||||
enabled: false
|
enabled: false
|
||||||
contents: |
|
contents: |
|
||||||
[Unit]
|
[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]
|
[Timer]
|
||||||
OnCalendar=Fri 0:15
|
OnCalendar=Fri 0:15
|
||||||
|
Loading…
Reference in New Issue
Block a user