Workflow for Developing Custom Features with frappe_docker and Deploying to K8s

Hi everyone,

I’m working on developing custom features for ERPNext using the frappe_docker setup. I’ve already set up my development environment and am ready to start making modifications. However, I’m looking for guidance on the best practices for managing the development workflow, specifically focusing on building a new Docker image and deploying it to a Kubernetes (K8s) production environment.

Here’s what I’ve done so far:

  1. Setting up the Development Environment:
  • Cloned the frappe_docker repository.
  • Used frappe_docker to set up a local development environment.
  1. Making Customizations:
  • Implemented the necessary changes in the codebase.
  • Tested the modifications locally to ensure they work as expected.

Now, I need guidance on:

  • Building a New Docker Image:
    • How do I build a Docker image that includes the customizations?
    • What is the best practice for tagging the image (e.g., mycompany/my-erpnext:custom-feature)?
  • Deploying to Production:
    • What steps should I follow to update the production environment running on Kubernetes (K8s) to use the new Docker image?
    • Are there any specific tools or workflows that can help streamline this process?
  • Security and Best Practices:
    • How can I ensure that my custom Docker images are secure and comply with best practices?
    • Are there any specific security considerations for deploying to K8s?

Questions:

  • Can anyone share their experience with deploying custom features developed with frappe_docker to a Kubernetes cluster?
  • What are some strategies for automating the build and deployment process, especially for continuous integration/continuous deployment (CI/CD)?
  • Are there any gotchas or common pitfalls to watch out for when deploying to K8s?

Any advice or links to relevant documentation would be greatly appreciated. Thank you!

Best regards