Closed pbauer closed 2 months ago
@pbauer @ericof I checked the setup, but create-site is already called from the Dockerfile as the default entrypoint. And the site is created, otherwise it wouldn't be online because the plonesite itself would not exist and the volto frontend would have nothing to contact.
I suspect something with the docker-entrypoint.sh script and the seleciton of the profile and distribution is not working out. installing the site locally now to debug.
I can reproduce the issue locally, built the frontend from source, but the backend with 'make build-image'. then start the backend with my freshly built local image (replace the image_id):
docker run --rm -it -p 8080:8080 603eaf9a5cb8 create-site
But I don't get how this was runnign correctly before, becaus the create-site option just exits. The docker-entrypoint.sh comes from the official plone-backend image here:
So if it only runs a script and then exits, the container is removed again and nothing happens. I wonder how this worked at all in the past.
We could update the docker-entrypoint.sh script with a create-site-start case where we execute runwsgi from the start case after creating the site.
The file /app/scripts/create_site.py
has nothing to do with the script scripts/create-site.py
from this repo. it is https://github.com/plone/plone-backend/blob/6.0.x/skeleton/scripts/create_site.py because the Dockerfile uses FROM plone/plone-backend:${PLONE_VERSION}
The create-site.py
is this repo was basically copied from plone.edu
. When building the image it is copied into the container next to create_site.py
and the Dockerfile still ran create_site.py
using docker-entrypoint.py
:
elif [[ "$1" == "create-site" ]]; then
export TYPE=${TYPE:-volto}
exec $sudo $VENVBIN/zconsole run etc/${CONF} /app/scripts/create_site.py
I now simply renamed the script here thus replacing the default from plone-backend and it worked :)
@pbauer I should have looked here before I tried to build locally (and, of course), it did work :-)
Duh...... - vs _ :-)
After the merge of https://github.com/plone/demo.plone.org/pull/35 both demo-sites are empty:
https://demo.plone.org https://classic.demo.plone.org
I guess
make create-site
needs to be added to the deployment-pipeline.