Fix dev composer and update cron script
All checks were successful
Deploy Spot / deploy (push) Successful in 34s

This commit is contained in:
2026-05-27 17:59:58 +02:00
parent 7ead18601c
commit 313dab26a2
4 changed files with 43 additions and 3 deletions

3
.gitignore vendored
View File

@@ -4,4 +4,5 @@
/geo/
/node_modules/
/log.html
/dist/
/dist/
/composer.dev.lock

5
cli/cron.sh Normal file → Executable file
View File

@@ -1,4 +1,5 @@
#!/bin/bash
wget -qO- https://spot.lutran.fr/index.php?a=update_project > /dev/null
cd "$(dirname "$0")/.." || exit 1
php -f dist/index.php a=update_project > /dev/null
#Crontab job: 0 * * * * . /var/www/spot/spot_cron.sh > /dev/null
#Crontab job: 0 * * * * /path/to/spot/cli/cron.sh > /dev/null

28
composer.dev.json Normal file
View File

@@ -0,0 +1,28 @@
{
"name": "franzz/spot",
"description": "LiveTrail",
"type": "project",
"license": "GPL-3.0-or-later",
"repositories": [
{
"type": "path",
"url": "../objects",
"options": {
"symlink": true
}
}
],
"require": {
"franzz/objects": "dev-vue",
"phpmailer/phpmailer": "^7.1"
},
"autoload": {
"psr-4": {
"Franzz\\Spot\\": "lib/",
"Franzz\\Objects\\": "../objects/inc/"
},
"files": [
"config/settings.php"
]
}
}

View File

@@ -34,6 +34,16 @@
8. Go to #admin and create a new project, feed & maps
9. Add a GPX file named <project_codename>.gpx to /geo/
## Local Development
When developing Spot and the sibling `objects` library together, install dependencies through the local Composer manifest:
```bash
COMPOSER=composer.dev.json composer update
```
This makes Composer link `vendor/franzz/objects` to `../objects` and autoload that namespace directly from the local source path. Production continues to use `composer.json`, which installs `franzz/objects` from its Git repository. Commit and publish `objects` changes before updating/deploying a Spot version that relies on them.
## To Do List
* Add mail frequency slider