Based on example here I added entrypoint: sh -c 'tail -f /dev/null':
version: "3"
services:
backend:
image: plone/plone-backend:6.0
restart: always
environment:
ZEO_ADDRESS: zeo:8100
ports:
- "8080:8080"
depends_on:
- zeo
entrypoint: sh -c 'tail -f /dev/null'
zeo:
image: plone/plone-zeo:latest
restart: always
volumes:
- data:/data
ports:
- "8100:8100"
volumes:
data: {}
I started the app using docker-compose up as usual, then I run docker-compose exec backend bash. Now I can't find a way to start the instance. I expect something like: bin/instace fg.
I tried this a lot with no success. Not working with build: ., not working with a new Dockerfile based on plone/plone-backend:6.0 + buildout.cfg, etc. I feel it should be simple, but just can't figure it out.
but in my case I don't want a debug mode in this way. My goal is to edit with vim some files from eggs, to add some pdb then I want to start the instance in foreground mode, in order to investigate how some functionalities are working. I do this a lot in Plone 4. How can I do this in Plone 6?
A solution (but see the UPDATED one)
Go into container with:
$ docker-compose exec backend bashThen run:
$ gosu plone /app/bin/runwsgi -v etc/zope.ini config_file=zope.confThis will start the instance in fg mode. (http://0.0.0.0:8080/)
I found this here: https://github.com/plone/plone-backend/issues/64#issuecomment-1211912408
UPDATE (better solution):
You can copy this entire code into your docker-compose.yml and you will have the instructions as comments.