plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
446 stars 606 forks source link

Added data folder as volume for backend-docker-start #6168

Closed ichim-david closed 1 month ago

ichim-david commented 1 month ago

This way we make it easy for the beginners that have the docs to use backend-docker-start to run Plone backend to have their data persisted

netlify[bot] commented 1 month ago

Deploy Preview for plone-components canceled.

Name Link
Latest commit a6735738b594053d343b5555280c873c3ade3845
Latest deploy log https://app.netlify.com/sites/plone-components/deploys/66a07d7687d28700084df3b5
wesleybl commented 1 month ago

@ichim-david I tested but couldn't log in. I tried:

admin:admin admin:secret

ichim-david commented 1 month ago

@ichim-david I tested but couldn't log in. I tried:

admin:admin admin:secret @wesleybl

@ichim-david I tested but couldn't log in. I tried:

admin:admin admin:secret

@wesleybl works for me with admin:admin, removed my data and tried again and same result. try in incognito

wesleybl commented 1 month ago

@wesleybl works for me with admin:admin, removed my data and tried again and same result. try in incognito

I tried again and it worked.

The data was percised.

ichim-david commented 1 month ago

I tested it and it worked. Just one doubt. Won't this make searches in the package/volto folder more time consuming? We will have many files in the data folder. Maybe we should use the default volume path?

@wesleybl could be an issue depending on the editor. For VS Code it respects the .gitignore settings if the "Gear icon Use Exclude settings and ignore Files" option is on. Similar settings is found for Pycharm. If this is a problem try another way to define the volume and come up with a suggestion for a change, at least that way we have a comparison on what might work best given each pro and cons.

search-exclude

wesleybl commented 1 month ago

@ichim-david I suggest:

docker run -it --rm --name=backend -p 8080:8080 -v volto-backend-data:/data -e SITE=Plone -e ADDONS='$(KGS)' $(DOCKER_IMAGE)

This way we won't have extra files in the repository.

ichim-david commented 1 month ago

@wesleybl added your suggestion in https://github.com/plone/volto/pull/6168/commits/6f4b382b15b5ca178b0d0191a5becf9cd7284635

wesleybl commented 1 month ago

including the way of wipe that persistence, if needed.

@sneridagh maybe have a new make command, or is it not necessary? The command to clean would be:

docker volume rm volto-backend-data
stevepiercy commented 1 month ago

@ichim-david OK to merge, after my revisions?

ichim-david commented 1 month ago

@stevepiercy yup from my point of view it's ready to merge as well