Skip to content

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

  1. Read the CHANGELOG.md entries newer than your version.
  2. Get the new code: git pull (or the new release archive).
  3. Build: with Docker docker compose -f compose.prod.yaml build && docker compose -f compose.prod.yaml up -d; without Docker composer install --no-dev --optimize-autoloader && npm ci && npm run build.
  4. Run the update:
bin/update

bin/update:

  1. backs up the database with bin/backup-db (needs DB_USER, DB_NAME and MYSQL_PWD; set SKIP_BACKUP=1 only when the database is backed up another way, e.g. a managed database or a volume snapshot taken just before);
  2. 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;
  3. 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 update php bin/console app:theme:check lists 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.