mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-26 09:05:10 +00:00
Reso indipendente ambiente sviluppo
This commit is contained in:
parent
8843b6ee76
commit
2bf770a2ab
3 changed files with 29 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -8,7 +8,6 @@ sites
|
|||
|
||||
development
|
||||
!development/README.md
|
||||
!development/frappe-bench/apps/erpnext/*
|
||||
deploy_key
|
||||
deploy_key.pub
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue