Erp Development
Creating containers
Setup first bench
Edit Honcho’s Procfile
Install an app
Start Frappe without debugging
If you faced some troubles
Creating containers
First of all you need to clone “frappe_docker” repo:
Second step rename the folders below:
Now you have to open a cloned folder as “dev container”. Open the cloned folder in the new window . It requires Dev Containers extension for VS Code.
VS Code message you that you can reopen this folder as container. Bet it.After that you will have almost empty working directory. Don’t worry about that.
It should create and start frappe_docker_devcontainer with 5 subcontainers inside.
Setup first bench
If you’re installing Frappe from version-14 branch
If you’re installing Frappe from version-15 branch
You should login as root for the next steps. You can do it by connecting to the devcontainer_frappe using terminal.
Out of container, in your local terminal:
Configure database and redis connection
For any reason the above commands fail, set the values in common_site_config.json manually.
{
}
Edit Honcho’s Procfile
Create a new site with bench
bench new-site mysite.localhost --mariadb-root-password 123 --admin-password admin --no-mariadb-socket
To develop a new app, the last step will be setting the site into developer mode. Documentation is available at this link.
bench --site mysite.localhost set-config developer_mode 1 bench --site mysite.localhost clear-cache
Install an app
If you’re installing ERPNext from version-14 branch
bench get-app --branch version-14 erpnext bench --site mysite.localhost install-app erpnext
Then write:
bench version (to see all your installed apps versions) bench --site mysite.localhost migrate bench --site mysite.localhost clear-cache
If you’re installing ERPNext from version-15 branch
bench get-app --branch version-15 erpnext bench --site mysite.localhost install-app erpnext
Then write:
bench version (to see all your installed apps versions) bench --site mysite.localhost migrate bench --site mysite.localhost clear-cache
Start Frappe without debugging
Execute following command from the frappe-bench directory:
You can now login with the user Administrator and the password you choose when creating the site. Your website will now be accessible at location mysite.localhost:8000
If you faced some troubles
If you got ProgrammingError on site - try
If after that you got a “Your system is being updated. Please refresh again after a few moments” on the login page - try to erase “maintenance_mode” (ot set it to 0) property in common_site_config.json.