How to Import fixtures into a production frappe_docker env?
Working in version-12
Wiki talks a bit about fixtures but, I have not been able to persist changes on a docker production env.
Instructions from the previous wiki lack of information for production environments.
development and production environments are not connected.
development is just dockerized setup to bootstrap environment to start development.
development containers are not immutable.
production is minimal environment(s) to serve frappe/ERPNext.
production containers don’t have bench or any development tools.
Custom Apps section of readme explains how to make custom apps into docker image(s).
Note that, ERPNext is also custom app installed on frappe framework. Check how ERPNext images are made using install_app wrapper script contributed by chabad360.
My concern is not about environments but how to reach to the main subject of this post. What is the process of applying “changes” into a production instance.
I didn’t find the process described in the repository documentation clear enough, but as I said before,. I may need to try the whole process before I make sure there are no gaps.
Thanks any way for your response @revant_one
Only in case new site is created the app will be installed, there is no way currently to install app to existing site in production environment. App are installed on site creation.
That is exactly what I was afraid of. And didn’t find in documentation.
Thanks for confirming that it is not possible to install an app on an existing production site. I appreciate the time you have saved me before trying.
I hope it is in the roadmap of docker_frappe to make it possible.
I have been able to apply changes to code trough a git apply patch.
Not all customisations will take effect. But for some .py and .html file updates, it did the trick for me.
Changes will be lost when container is updated, so we may need to apply patches again.
All I did to the docker environment was to add the apps folder to a volume to be able to access it.
So I know this works for code updates but, would this work for doctypes?
Yes, I wanted to apply a patch to erpnext code.
So it perfectly works. “it is a contribution to core that has not been yet approved” so need to do it manualy.
Ok, so still looking for ways to make safe updates to the core in this docker prod env.
I may tray, migration command for json files. It is ready and it is possible
I was not looking for custom-apps my self either. It is just there seems to not be more options left. Are there?
The instructions provided will be very helpful in case I do not find any other way to complete a development cicle into production.
On this learning process I am still looking for a good flow on a complete dev → test → prod development and integration pipeline. Also learning what can be done and how… your support and your many posts in this forum are making this learning process possible.