Skip to content
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

Demo sites are empty #36

Closed
pbauer opened this issue Mar 12, 2024 · 6 comments
Closed

Demo sites are empty #36

pbauer opened this issue Mar 12, 2024 · 6 comments
Assignees

Comments

@pbauer
Copy link
Member

pbauer commented Mar 12, 2024

After the merge of #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.

@pbauer pbauer changed the title Demo are empty Demo sites are empty Mar 12, 2024
@fredvd
Copy link
Member

fredvd commented Mar 13, 2024

@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.

./docker-entrypoint.sh create-site

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.

@fredvd
Copy link
Member

fredvd commented Mar 13, 2024

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:

https://github.com/plone/plone-backend/blob/416e5177ae29997c985da019b573bd17c0cf2981/skeleton/docker-entrypoint.sh#L154-L156

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.

@pbauer
Copy link
Member Author

pbauer commented Mar 14, 2024

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}

@pbauer
Copy link
Member Author

pbauer commented Mar 14, 2024

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 pbauer closed this as completed Mar 14, 2024
@ericof
Copy link
Member

ericof commented Mar 14, 2024

@pbauer I should have looked here before I tried to build locally (and, of course), it did work :-)

@fredvd
Copy link
Member

fredvd commented Mar 14, 2024

Duh...... - vs _ :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants