From bc3b3aa83e8eda621fe1e71b0d65e70d3ef01313 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Thu, 25 Feb 2021 15:29:54 +0530 Subject: [PATCH 1/4] docs: improve docs Add section about wiki in contribution section Mention about wiki in README Mention about cron job in README [skip travis] --- CONTRIBUTING.md | 4 ++++ README.md | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index debf9c61..6e1bc6da 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,3 +32,7 @@ Please be considerate when pushing commits and opening PR for multiple branches, # Documentation Place relevant markdown file(s) in the `docs` directory and index them in README.md located at the root of repo. + +# Wiki + +Add alternatives that can be used optionally along with frappe_docker. Add articles to list on home page as well. diff --git a/README.md b/README.md index 3a47895e..f4390a56 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,11 @@ It takes care of the following: * Setting up all the system requirements: eg. MariaDB, Node, Redis. * Configure networking for remote access and setting up LetsEncrypt. +It doesn't take care of the following: + +* Cron Job to backup sites is not created by default. +* Use `CronJob` on k8s or refer wiki for alternatives. + 1. Single Server Installs 1. [Single bench](docs/single-bench.md). Easiest Install! 2. [Multi bench](docs/multi-bench.md) @@ -45,6 +50,7 @@ It takes care of the following: 4. [Environment Variables](docs/environment-variables.md) 5. [Custom apps for production](docs/custom-apps-for-production.md) 6. [Tips for moving deployments](docs/tips-for-moving-deployments.md) +7. [Wiki for optional recipes](https://github.com/frappe/frappe_docker/wiki) ## Development Setup From 106c17418d786fa1995338a1ac53971812a707f3 Mon Sep 17 00:00:00 2001 From: John Veness Date: Fri, 26 Feb 2021 20:26:45 +0000 Subject: [PATCH 2/4] Fix description of FRAPPE_... and ERPNEXT_VERSION --- docs/docker-swarm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docker-swarm.md b/docs/docker-swarm.md index 0adc3eac..6c762911 100644 --- a/docs/docker-swarm.md +++ b/docs/docker-swarm.md @@ -261,8 +261,8 @@ networks: Use environment variables: -- `FRAPPE_VERSION` variable to be set to desired version of ERPNext. e.g. 12.10.0 -- `ERPNEXT_VERSION` variable to be set to desired version of Frappe Framework. e.g. 12.7.0 +- `ERPNEXT_VERSION` variable to be set to desired version of ERPNext. e.g. 12.10.0 +- `FRAPPE_VERSION` variable to be set to desired version of Frappe Framework. e.g. 12.7.0 - `MARIADB_HOST=frappe-mariadb_mariadb-master` - `SITES` variable is list of sites in back tick and separated by comma ``` From d2450ef7421c881ea238e2944647ea3fd5735211 Mon Sep 17 00:00:00 2001 From: "Chinmay D. Pai" Date: Sun, 28 Feb 2021 14:46:50 +0530 Subject: [PATCH 3/4] fix: change import path for new_site command `_new_site` has been moved to `installer.py` in frappe/frappe#12447 Signed-off-by: Chinmay D. Pai --- build/common/commands/new.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/common/commands/new.py b/build/common/commands/new.py index ade7e476..22b8a82a 100644 --- a/build/common/commands/new.py +++ b/build/common/commands/new.py @@ -2,8 +2,7 @@ import os import frappe import semantic_version -from frappe.commands.site import _new_site -from frappe.installer import update_site_config +from frappe.installer import _new_site, update_site_config from constants import COMMON_SITE_CONFIG_FILE, RDS_DB, RDS_PRIVILEGES from utils import ( run_command, From 3cf41a18f74e7e95fe4892da28e2d27ec7524a35 Mon Sep 17 00:00:00 2001 From: "Chinmay D. Pai" Date: Mon, 1 Mar 2021 00:47:00 +0530 Subject: [PATCH 4/4] fix: add try-except block for importing new_site maintain compatibility across frappe versions. Signed-off-by: Chinmay D. Pai --- build/common/commands/new.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build/common/commands/new.py b/build/common/commands/new.py index 22b8a82a..b54bfc18 100644 --- a/build/common/commands/new.py +++ b/build/common/commands/new.py @@ -2,7 +2,7 @@ import os import frappe import semantic_version -from frappe.installer import _new_site, update_site_config +from frappe.installer import update_site_config from constants import COMMON_SITE_CONFIG_FILE, RDS_DB, RDS_PRIVILEGES from utils import ( run_command, @@ -11,6 +11,16 @@ from utils import ( get_password, ) +# try to import _new_site from frappe, which could possibly +# exist in either commands.py or installer.py, and so we need +# to maintain compatibility across all frappe versions. +try: + # <= version-{11,12} + from frappe.commands.site import _new_site +except ImportError: + # >= version-13 and develop + from frappe.installer import _new_site + def main(): config = get_config()