How to add CI/CD in my new app

hi, I’m a fresh about frappe, so have some questions about how to manage our small team to use this framework.

Is there some best practice for developing to production?

I’ve few notes for self-hosted container based workflow here: https://github.com/castlecraft/custom_containers/blob/main/docs/frappe-ci-cd.md

  • There are always multiple apps over the period. App repo can only do format, lint and tests. Developer teams send PR to their respective apps and trigger the “test pipeline”. Check frappe, erpnext, hrms repos.
  • There needs to be additional repo to combine and build multiple apps when you create a release of a bench (combination of apps). Devops or automated requests from app repo(s) can trigger the “build pipeline”. check frappe_docker repo
  • “builder repo” combines the apps as part of build pipeline as image and push it to (private or public) image registry.
  • If you are sure that you will never have more than 1 app, then combine the builder-repo and app repo pipelines in app repo.
  • Once the image is ready you can deploy it to multiple environments, e.g. test, dev, staging, production.
  • Optionally use gitops for managing infrastructure
1 Like

Thank you, but I can not read anything about db migrations, if devloper change db or meta docs in development envirments, how to update code, table structure and db recordes to production envirment.

That happens when bench --site ... migrate command is executed after new code is in environment

Or like following (replace site name or specify all)

It’s a container task in case of compose and job in case of kubernetes.

thanks.