add a script for update

This commit is contained in:
kbe
2025-08-19 23:48:30 +02:00
parent 98f639b913
commit ef7951c1e4
38 changed files with 229 additions and 29 deletions

37
scripts/README.md Normal file
View File

@@ -0,0 +1,37 @@
# Website Update Script
This script triggers the builder container to update the website content using Docker Compose.
## Usage
1. Make the script executable:
```sh
chmod +x scripts/update-website.sh
```
2. Run the script manually to test it:
```sh
./scripts/update-website.sh
```
3. To set up a cron job, add the following line to your crontab (edit with `crontab -e`):
```sh
0 2 * * * /home/acid/Documents/mistergeek/scripts/update-website.sh >> /home/acid/Documents/mistergeek/logs/update-website.log 2>&1
```
This will run the update script every day at 2:00 AM.
Alternatively, you can run the update script every 6 hours:
```sh
0 */6 * * * /home/acid/Documents/mistergeek/scripts/update-website.sh >> /home/acid/Documents/mistergeek/logs/update-website.log 2>&1
```
## Logs
Logs are stored in `/home/acid/Documents/mistergeek/logs/update-website.log`.
## Requirements
- Docker
- Docker Compose
- The `docker` and `docker compose` commands must be available in the system's PATH