Installing a custom app on your running ERPNext instance that’s installed via Docker involves a few steps. Here’s a simplified guide on how to do it:
Note: Before installing any custom app, it’s always recommended to take a backup of your ERPNext instance, especially if it’s in a production environment. Also, thoroughly test the custom app to ensure it works as expected without causing any conflicts with existing functionality.
Access Your Docker Container: First, you need to access the Docker container where ERPNext is installed. You can do this using the docker exec command as shown below:
sudo docker exec -it <NAME> /bin/bash
Navigate to the Frappe Bench Directory: Ensure you are inside the bench directory. You can tell by checking whether you can run bench commands. If not, usually it’s located at /home/frappe/frappe-bench
.
Clone the Custom App: If you already have the custom app code, you can clone it directly into the apps
directory inside the Frappe Bench directory:
git clone <repository_url>
Install the Custom App: Install the custom app with the following command:
bench --site <site_name> install-app <app_name>
Migrate the site: When installation is completed, you will need to run the below migrate command to effect the changes to the database:
bench --site <site_name> migrate
Ensure you replace <site_name> and <app_name> with the name of your site and the name of your app respectively.
Restart the containers: Restart the containers to effect all the changes that have happened during the setup of the custom app.
Check Installation: After restarting the services, you can verify if the app is installed properly by accessing the ERPNext web interface and checking if the app appears in the module list.