plone / cookieplone-templates

Plone templates used with cookieplone
MIT License
1 stars 1 forks source link

Develop add-ons from source in Dockerfiles #108

Open Fosten opened 5 days ago

Fosten commented 5 days ago

Cookieplone Dockerfiles do not currently develop add-ons from source. This is how I solved it.

In the frontend Dockerfile https://github.com/plone/cookieplone-templates/blob/6e8c38d31c345198262caf5fc03c0a1e748dba4b/sub/project_settings/%7B%7B%20cookiecutter.__folder_name%20%7D%7D/frontend/Dockerfile

Add these 2 lines to copy in and run mrs.developer:

COPY --chown=node mrs.developer.json /app/
pnpm dlx mrs-developer missdev --no-config --fetch-https

In the backend Dockerfile https://github.com/plone/cookieplone-templates/blob/6e8c38d31c345198262caf5fc03c0a1e748dba4b/sub/project_settings/%7B%7B%20cookiecutter.__folder_name%20%7D%7D/backend/Dockerfile

mx sources are fetched but then deleted, so remove these 2 lines:

cd /app
rm -Rf src/

Another way to solve this might be to change the mx directory to ./sources instead of src

davisagli commented 5 days ago

@Fosten Thanks for the report. It makes sense to me that we should try to support this.

I'm busy getting ready for ploneconf and might not be able to work on it for a little while. You could help move it forward by:

  1. Give instructions on how to reproduce the problem (i.e. give an example of what needs to be added to the files generated by cookieplone in order to configure these addons to be fetched from source)
  2. Prepare a PR with your suggested changes.