diff --git a/docs/site-operations.md b/docs/site-operations.md index f8a37417..5f93f832 100644 --- a/docs/site-operations.md +++ b/docs/site-operations.md @@ -271,3 +271,20 @@ Environment Variables needed: Environment Variables for PostgreSQL only: - `POSTGRES_PASSWORD`: Password for `postgres`. The database root user. + +## Migrate Site + +```sh +# Migrate ERPNext site +docker run \ + -e "MAINTENANCE_MODE=1" \ + -v _sites-vol:/home/frappe/frappe-bench/sites \ + -v _assets-vol:/home/frappe/frappe-bench/sites/assets \ + --network _default \ + frappe/erpnext-worker:$ERPNEXT_VERSION migrate +``` + +Environment Variables needed: + +- `MAINTENANCE_MODE`: If set to `1`, this will ensure the bench is switched to maintenance mode during migration. +- `SITES`: Optional list of sites to be migrated, separated by colon (`:`). e.g. `erp.site1.com:erp.site2.com`. If not used, all sites will be migrated by default.