Best Practices for CI/CD in Frappe/ERPNext Projects

Hi everyone,

I’m looking for guidance on implementing a proper CI/CD workflow for a Frappe/ERPNext project.

In many other frameworks, we typically use Git-based deployment pipelines (GitHub Actions, GitLab CI, Jenkins, etc.) that automatically:

  • Pull the latest code from the repository.

  • Install/update dependencies.

  • Build the application.

  • Run tests.

  • Apply database migrations.

  • Restart the application.

I’m trying to understand what the recommended approach is for Frappe/ERPNext.

Some specific questions I have are:

  1. What CI/CD tools are commonly used by the Frappe community (GitHub Actions, GitLab CI, Jenkins, Azure DevOps, etc.)?

  2. How do you deploy custom Frappe apps from Git repositories?

  3. What commands are typically executed during deployment? For example:

    • bench update

    • bench migrate

    • bench build

    • bench restart

    • or another recommended workflow.

  4. How do you handle Python and Node.js dependency installation during deployment?

  5. Is it recommended to deploy directly with bench update, or should deployments use a custom script?

  6. For production environments, what is considered the safest deployment strategy with minimal downtime?

  7. If multiple custom apps are installed on the same bench, what is the recommended CI/CD workflow for updating them?

  8. Are there any open-source examples or production-ready CI/CD pipelines for Frappe/ERPNext that you would recommend?

I’m looking for a deployment workflow that follows industry best practices and is suitable for production environments.

I’d really appreciate it if anyone could share their deployment architecture, scripts, GitHub Actions/GitLab CI examples, or any lessons learned from running Frappe/ERPNext in production.

Thank you!

1 Like