-
Install dependencies:
composer install
-
Create database (if needed):
php bin/console doctrine:database:create
-
Initialize schema:
php bin/console doctrine:schema:create
-
Create
OSMCHA_API_KEY
in your environment with your OSMCha API key
- Install Symfony CLI
- Run
symfony server:start
- Browse the given URL
Check Symfony local server documentation for more information.
docker build . --tag osm-welcome-tool
docker run --detach --publish 80:80 --env-file .env.local osm-welcome-tool
Check Symfony deployment documentation.
vendor/bin/dep deploy --branch=2.x welcome.osm.be
npm run build
rsync -e ssh -avz public/build/ root@welcome.osm.be:/var/www/osm-welcome-tool/current/public/build/
Create an osm-welcome-tool
file in /etc/cron.daily
folder (for a daily update):
#!/bin/sh
BACKUP_DIRECTORY=/root/osm-welcome-tool
BACKUP_FILENAME=data.db
mkdir -p $BACKUP_DIRECTORY
# Remove all backups older than 30 days
find $BACKUP_DIRECTORY/$BACKUP_FILENAME.* -mtime +30 -delete
# Backup database
cp "/var/www/osm-welcome-tool/current/var/data.db" "$BACKUP_DIRECTORY/$BACKUP_FILENAME.$(date +"%Y%m%d")"
# Trigger update
cd "/var/www/osm-welcome-tool/current/"
php bin/console welcome:update