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

How to start instance in fg? #64

Closed
cekk opened this issue Aug 11, 2022 · 7 comments
Closed

How to start instance in fg? #64

cekk opened this issue Aug 11, 2022 · 7 comments
Labels

Comments

@cekk
Copy link
Member

cekk commented Aug 11, 2022

Is there a way to run this image in fg to debug addons?

I'm developing an add-on with plone-backend image and i need to put some pdb into its code but i don't know how to start the instance in fg.

I tried to bypass the entrypoint with command=bash but after that i don't know which script run and how.

Am i missing something or this isn't available yet? If not, how do you develop with plone6/pip?

@avoinea
Copy link
Sponsor Member

avoinea commented Aug 11, 2022

@cekk It's indeed a challenge as as after you figure out the command you'll notice it will fail with some undefined env variables:

Here is a demo working docker-compose.yml for eea.facetednavigation with the required environment variables:

https://github.com/collective/eea.facetednavigation/blob/bb540be19ae4af3bfa90f4fe58c7448bcaf8cc0f/docker-compose.yml#L12-L16

And the command you'll need to run within the container:

https://github.com/collective/eea.facetednavigation/blob/bb540be19ae4af3bfa90f4fe58c7448bcaf8cc0f/docker-compose.yml#L46-L47

@cekk
Copy link
Member Author

cekk commented Aug 11, 2022

damn, I started to put these ENV var manually but i didn't knew if it was the right way to do it.

Ok, with your example it works ;) thanks.

It could be nice to have these infos in the documentation, right? Or is it just temporary?

@avoinea
Copy link
Sponsor Member

avoinea commented Aug 11, 2022

Yes, we should add it to the docs. Also, it would be nice to have better defaults for those env variables in order not to care about them. But I'm not sure if zope.conf support it https://github.com/plone/plone-backend/blob/5.2.x/skeleton/etc/zope.conf

@ericof ^

@cekk
Copy link
Member Author

cekk commented Aug 11, 2022

Another thing: how to pin versions? i see VERSIONS env is missing and i don't see any way to use a custom requirements/constraints file.

@ericof
Copy link
Sponsor Member

ericof commented Aug 11, 2022

@cekk You can always extend this image with something like:

ARG PLONE_VERSION=6.0.0b1
FROM plone/plone-backend:${PLONE_VERSION}

# Add local code
COPY . .
RUN ./bin/pip install -r requirements.txt \
    && chown -R plone: /app/*

@cekk
Copy link
Member Author

cekk commented Aug 11, 2022

right..sorry for dumb questions, but I finally have some time to play with it

@jensens jensens added the 05 type: question discussing label Oct 16, 2022
@jensens
Copy link
Sponsor Member

jensens commented Oct 16, 2022

I think we can close this.

@jensens jensens closed this as completed Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants