From ae396d21743202af989318db62827c7704bbf27b Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Mon, 12 Apr 2021 11:17:38 +0530 Subject: [PATCH] docs: migration command and variables [skip travis] --- docs/site-operations.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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.