Getting started
Installs and updates
Versions
The installed version is in VERSION; what each version changes, and what taking it involves, is in CHANGELOG.md. The admin records which version the database is at, so an update knows what to do.
New install
php bin/console app:install, see Backend installation or Docker Deployment.
Updating
- Read the
CHANGELOG.mdentries newer than your version. - Get the new code:
git pull(or the new release archive). - Build: with Docker
docker compose -f compose.prod.yaml build && docker compose -f compose.prod.yaml up -d; without Dockercomposer install --no-dev --optimize-autoloader && npm ci && npm run build. - Run the update:
bin/update
bin/update:
- backs up the database with
bin/backup-db(needsDB_USER,DB_NAMEandMYSQL_PWD; setSKIP_BACKUP=1only when the database is backed up another way, e.g. a managed database or a volume snapshot taken just before); - runs
app:update: shows the changelog since your version, applies the database changes, creates new photo sizes when the release adds one, records the new version; - clears the cache and restarts the workers.
With Docker run it inside the container: docker compose -f compose.prod.yaml exec -e SKIP_BACKUP=1 app bin/update (after backing up the database volume).
Your changes survive updates
- Settings, categories, attributes, pages and locations are in the database.
- Photos are in
public/uploads(a Docker volume) or in your bucket. - A theme lives in
themes/<name>/; after an updatephp bin/console app:theme:checklists overrides whose base template changed, so you can bring them up to date. - Never edit files outside
themes/and.env.prod: an update replaces them.
Going back
Restore the backup bin/update made (gunzip -c backup.sql.gz | mysql ...), deploy the previous version's code or image, and clear the cache.
Found a mistake? Tell us.