Frappe ERPNext docker base local development setup - fnrfarid/excel-rma GitHub Wiki

Developer Environment Setup for Frappe-ERPNext, Excel_ERPNext

To setup the docker based development environment for Excel_ERPNext app in Windows based OS or other, follow these process accordingly.

  1. Download and install Docker, VS Code, Git for Windows. [If other OS, install these software as required]
  2. From CMD/terminal go to any directory and clone the Frappe git.
cd desktop
git clone https://github.com/frappe/frappe_docker.git
  1. Open the downloaded folder, copy the devcontainer-example folder, raname it to .devcontainer.

cp -R devcontainer-example .devcontainer

  1. Modify docker-compose.yml file under .devcontainer and add these lines under frappe section to make the localhost webhook working.
extra_hosts:
      - "rma.localhost:172.17.0.1"
  1. Copy example vscode config for devcontainer from development/vscode-example to development/.vscode. This will setup basic configuration for debugging.

cp -R development/vscode-example development/.vscode

  1. open frappe_docker in VS Code.

  2. Make sure to run the Docker application in the background. Install remote container extension in VS Code and other necessary extensions.

  3. Reopening in container will start the container creation process and create docker image and once done, the directory again will be available in VS Code.

  4. Then from VS Code terminal [create another terminal if needed] and follow the commands

bench init --skip-redis-config-generation --frappe-branch version-12 --python python3.7 frappe-bench
cd frappe-bench
// Add "db_host": "mariadb", in common_site_config file  and then continue other commands//*****
bench set-redis-cache-host redis-cache:6379
bench set-redis-queue-host redis-queue:6379
bench set-redis-socketio-host redis-socketio:6379
bench new-site erpnext.localhost --mariadb-root-password 123 --admin-password admin --no-mariadb-socket
bench --site erpnext.localhost set-config developer_mode 1
bench --site erpnext.localhost clear-cache
// install base erpnext v12 //*****
bench get-app --branch version-12 erpnext https://github.com/frappe/erpnext.git
bench --site erpnext.localhost install-app erpnext
// install custom excel_erpnext app v12 //*****
bench get-app --branch version-12 excel_erpnext https://gitlab.com/castlecraft/excel_erpnext.git
bench --site erpnext.localhost install-app excel_erpnext
bench start
  1. Once bench is started, erpnext.localhost will run as the local erpnext setup with our custom frappe app excel_erpnext. You can change the site name, password in the commands above if required. Login user: administrator, pass: admin

  2. Next is to setup rma-apps locally and connect it with this local erpnext app. Follow this: RMA Apps local development setup

If you want to restore a database on local to have some data to get start with, then follow this

  1. Download the database file from the provided links, move the downloaded database file to the frappe_docker/development directory.
  2. Restore the mariadb database by running bench --site erpnext.localhost --force restore /workspace/development/path_to_database_file
  3. If restore is successful, then login to the application again with [email protected] & Admin123 credentials and create other users as required. As this is a system admin account, you can create other things with this account.