Share your development setup. Here is mine

Hi all,

as development system, I use

  • Windows or Debian GNU/Linux as host machine (can be really anything)
  • Oracle VirtualBox to contain the dev images
  • Debian Stretch amd64 with LXDE as a virtual guest (I have a fresh install with Geany and MySQL Workbench which I clone to do new stuff; each guest should have 2 vCPUs, 2-4 GB RAM, 16 GB disk; guest connected using NAT, mapped to localhost:8080)
  • Install ERPNext from the Easy Install: GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

The good thing is that when things are really messed up you can simply go back to a previous snapshot, or take a fresh clone from the original image.

1 Like

Yes what relief and assurance that spells - when at an impasse and all else fails, to be able to simply backout to an old snapshot/checkpoint working state, and resume from there once more with your changes - that is the cat’s meow!

2 Likes

Can someone make a video of this setting up and show making a few changes to testing and deploying.

An Acer ChromeBook network connected to a 1GB VPS. My local Acer Chromebook, converted to Ubuntu laptop by using MrChromeBox and GalliumOS, is network connected to a Digital Ocean 1GB Debian server. Easy Install production onto Debian, configure the username “frappe” for sudo privileges and Public Key ssh login, and now on Debian:

>sudo service nginx stop
>sudo service supervisor stop
>bench (create new sites, like in the Frappe tutorial)

On the laptop, also edit the file “/etc/hosts” to add site_names like from the Frappe tutorial:

127.0.0.1 site_name_1

Finally, execute this bash script on the laptop:

#!/bin/bash
# Save this file to frappe_tunnel.sh, and then "chmod 755 frappe_tunnel.sh"

ssh -f -q -N -M -S /tmp/session1 -L 8000:$2:8000 frappe@$1
ssh -f -q -N -M -S /tmp/session2 -L 9000:$2:9000 frappe@$1
(sleep 5; firefox http://$2:8000) &
ssh frappe@$1  -t 'cd frappe-bench && bench start && exec $SHELL -l'
ssh -S /tmp/session1 -O exit $1
ssh -S /tmp/session2 -O exit $1

chmod 755, then execute, using your own server domain name and development site name

>./frappe_tunnel.sh example.com site_name_1

In summary, “etc/hosts” on both machines resolve the site_name, and SSH tunnels ports 8000 and 9000. This script opens the tunnels, starts your test server, and opens firefox to your test site. When you control-C the test server, the tunnels close.

To restart production, SSH into Debian and:

>sudo service nginx start
>sudo service supervisor start

For editor, I’m using VSCode with Remote-SSH

Hi,

I have installed ERPNext on VirtualBox, installed apps and made changes. Can anybody tell me how I publish virtual image code and on which server I need to choose for deployment?

Thanks

I have a ubuntu workstation and I setup docker on it.

I then forked the docker images here GitHub - frappe/frappe_docker: Docker images for production and development setups of the Frappe framework and ERPNext

Then I setup my pycharm to remote debug the docker containers this allows me to do code stepping making debugging so so much easier.

Then I just open ports on my workstation if I need to access it remotely.

1 Like


I have a custom version of the frappe_docker development setup.
I edited the bench image just to use bench 5.8.1 and Python 3.8.10.
If it is the first time you open the container, frappe and erpnext will be installed (v13), along with some other cool tools: Zsh, Oh My Zsh, Powerlevel10k, diff-so-fancy and localtunnel.

In the terminal (inside the container), I have 4 commands that I use very often:

  • newsite issue_X: Create a new site called issue_X. It also completes the wizard and loads the erp with some payload data.
  • usesite issue_Y: Change the current site to issue_Y.
  • dropsite issue_Z: Delete the site issue_Z.
  • loca: Executes localtunnel and expose the currently running site to the web.