frappe / frappe_docker

Docker images for production and development setups of the Frappe framework and ERPNext
MIT License
1.51k stars 1.4k forks source link

Best Practices for Migrating ERPNext and Frappe Apps Versions Using Custom Docker Images and Docker Compose? #1473

Closed edardev closed 2 months ago

edardev commented 2 months ago

Hello everyone,

I’m working with a custom Docker Compose setup to manage Frappe and ERPNext environments. I’m looking for guidance on the best practices for migrating between different versions of ERPNext or Frappe apps, specifically when upgrading or downgrading versions using custom Docker images.

Here are the key scenarios I’m working with:

Downgrading ERPNext Versions: What’s the safest and most reliable way to downgrade ERPNext in a Docker environment? For example, if I need to revert from v15.36.1 to v15.34.0, how can I achieve this without risking data integrity or causing issues in the database and the environment? Upgrading ERPNext to Newer Versions: When upgrading to newer versions (e.g., moving from v15.34.0 to v15.36.1 or newer), what steps should I follow to ensure a smooth transition? How can I manage the migration of database schemas and app changes without disrupting the existing setup? Switching Between Branches and Tags: How do you efficiently switch between different branches or tags (e.g., from version-15 to a specific tagged release like v15.34.0) in a Docker Compose-based setup? What are the implications for the database and app structure when switching between tags or branches? Are there any tools or workflows that can simplify this process? Handling Versioning and Rollbacks: What is the best strategy for rolling back an upgrade if something goes wrong? How can I properly tag Docker images and manage container snapshots to quickly revert to a stable version? Database Migrations and Backup/Restore Practices: When performing upgrades or downgrades, what are the recommended practices for handling database migrations? Should I always create a database backup before switching versions? How can I ensure that the database schema is consistent with the app version when downgrading or upgrading? Managing Multiple Environments: How can I effectively manage multiple environments (e.g., production, staging) with different versions of ERPNext/Frappe using Docker Compose? Any recommendations on handling isolated setups, while still allowing for easy upgrades/downgrades? Any insights or advice on how to safely and effectively manage version upgrades or downgrades for Frappe and ERPNext using Docker Compose would be highly appreciated. I’m particularly interested in understanding how to handle migrations and version management in production environments.

Thanks in advance!

edardev commented 2 months ago

Additionally, I want to install the apps based on a specific version tag. When I used branches like develop or version-15, they installed the latest version, v15.36.1, which contains several bugs. For example, I encountered issues where I couldn’t create purchase orders or invoices, whereas these functionalities worked fine in a previous version like v15.34.1.

Here’s the JSON I passed to the image in Base64: [ { “url”: “GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)”, “branch”: “version-15” } ]

OR

[ { “url”: “GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)”, “branch”: “develop” } ]

However, using these branches installs the latest versions, which are buggy. Instead, I want to specify a version tag to install an exact, stable version.

For example, this is what I want to do:

[ { “url”: “GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)”, “tag”: “v15.34.1” } ]

revant commented 2 months ago

https://discuss.frappe.io/t/best-practices-for-migrating-frappe-apps-versions-using-custom-docker-images-and-docker-compose/133659/3