diff --git a/.gitignore b/.gitignore index b3ec5418..e6ae4965 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ sites development !development/README.md -!development/frappe-bench/apps/erpnext/* deploy_key deploy_key.pub diff --git a/build/bench/Dockerfile b/build/bench/Dockerfile index 98fb9cde..586d7afc 100644 --- a/build/bench/Dockerfile +++ b/build/bench/Dockerfile @@ -1,5 +1,5 @@ # Frappe Bench Dockerfile -FROM bitnami/minideb:latest +FROM graficheaquilane/minideb:latest LABEL author=frappé RUN install_packages \ @@ -55,7 +55,7 @@ RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ && dpkg-reconfigure --frontend=noninteractive locales # Install wkhtmltox correctly -RUN wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb +RUN wget https://github.com/GraficheAquilane2021/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb RUN dpkg -i wkhtmltox_0.12.5-1.buster_amd64.deb && rm wkhtmltox_0.12.5-1.buster_amd64.deb # Create new user with home directory, improve docker compatibility with UID/GID 1000, add user to sudo group, allow passwordless sudo, switch to that user and change directory to user home directory @@ -67,7 +67,7 @@ WORKDIR /home/frappe # Clone and install bench in the local user home directory # For development, bench source is located in ~/.bench -RUN git clone https://github.com/frappe/bench.git .bench \ +RUN git clone https://github.com/GraficheAquilane2021/bench.git .bench \ && pip3 install --user -e .bench # Export python executables for Dockerfile diff --git a/development/README.md b/development/README.md index 49753196..a5e7857b 100644 --- a/development/README.md +++ b/development/README.md @@ -180,6 +180,32 @@ bench --site erpnext.localhost install-app erpnext Note: Both frappe and erpnext must be on branch with same name. e.g. version-12 +### Enable hotreload for python code + +Follow this [guide](https://discuss.erpnext.com/t/python-changes-are-not-loaded-local-dev-environment-using-vagrant-osx/42809/30). +Here the main step + +```shell +open development/frappe-bench/apps/frappe/frappe/app.py +``` + +and add to run_simple command + +```shell +reloader_type='stat', +``` + +so the function will be like + +```shell +run_simple('0.0.0.0', int(port), application, + reloader_type='stat', + use_reloader=False if in_test_env else not no_reload, + use_debugger=not in_test_env, + use_evalex=not in_test_env, + threaded=not no_threading) +``` + ### Start Frappe without debugging Execute following command from the `frappe-bench` directory.