add a script for update
This commit is contained in:
37
scripts/README.md
Normal file
37
scripts/README.md
Normal 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
|
||||
Reference in New Issue
Block a user