-
-
Notifications
You must be signed in to change notification settings - Fork 177
Added recipe to have an interactive shell when using docker #1967
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
base: 6.0
Are you sure you want to change the base?
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
- Remove duplicate documentation directory that was causing submodule errors - Add submodules: true to CI workflows to properly handle submodules - Add comprehensive interactive shell debugging documentation for Docker containers Fixes plone#1960
@Thanush-03 please see Granting permission to publish. We can't accept your contribution without your explicit written permission. Thank you! |
Thankyou sir for review the work what I done.
I,Thanush K, agree to have this contribution published under Creative
Commons 4.0 International License (CC BY 4.0), with attribution to the
Plone Foundation.
Thank you sir.
…On Sat, 16 Aug 2025, 10:18 pm Steve Piercy, ***@***.***> wrote:
*stevepiercy* left a comment (plone/documentation#1967)
<#1967 (comment)>
@Thanush-03 <https://github.com/Thanush-03> please see Granting
permission to publish
<https://6.docs.plone.org/contributing/documentation/index.html#granting-permission-to-publish>.
We can't accept your contribution without your explicit written permission.
Thank you!
—
Reply to this email directly, view it on GitHub
<#1967 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BR3YYI4A2NHPJJXSDVQDEGL3N5OHNAVCNFSM6AAAAACEBTSID6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOJTG44DENRWHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Thanush-03 is "Thanush K" your actual full name? I've never seen a surname consisting of a single letter, except for Malcom X. Also did you test your instructions to make sure that they actually work? If you haven't actually tested the instructions, then please close this PR. Thank you! |
Yes my full name Thanush K ,sorry for that confusion.I have tested the
instructions it was worked.
…On Sat, 16 Aug 2025, 10:30 pm Steve Piercy, ***@***.***> wrote:
*stevepiercy* left a comment (plone/documentation#1967)
<#1967 (comment)>
@Thanush-03 <https://github.com/Thanush-03> is "Thanush K" your actual
full name? I've never seen a surname consisting of a single letter, except
for Malcom X.
Also did you test your instructions to make sure that they actually work?
If you haven't actually tested the instructions, then please close this PR.
Thank you!
—
Reply to this email directly, view it on GitHub
<#1967 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BR3YYI24RYVIQ4XDBYCVBRT3N5PSRAVCNFSM6AAAAACEBTSID6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOJTG44DONJRGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
- Remove references to deprecated plone.volto:default-homepage profile - Update documentation to recommend content export/import approach - Add explanatory notes about the profile removal in version 5 - Update Docker example to remove deprecated profile usage Fixes plone#118
@stevepiercy kindly review this and provide me any changes required |
@davisagli, @mauritsvanrees, @ericof, @sneridagh would you please do a technical review of the changes to the documentation regarding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only made a few style changes.
This looks really good, with the exception that I couldn't find my bin/instance
so couldn't run a debugger. What am I missing?
with: | ||
submodules: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add this? It's not broken and it has nothing to do with the purpose of this PR. Please revert.
with: | |
submodules: true |
with: | ||
submodules: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add this? It's not broken and it has nothing to do with the purpose of this PR. Please revert.
with: | |
submodules: true |
```{note} | ||
This is the recommended approach for creating example content in distributions. | ||
The old approach of using profiles like `plone.volto:default-homepage` has been deprecated and removed from `plone.volto` in version 5. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davisagli can I get a confirmation about this change?
```{note} | |
This is the recommended approach for creating example content in distributions. | |
The old approach of using profiles like `plone.volto:default-homepage` has been deprecated and removed from `plone.volto` in version 5. | |
```{versionremoved} `plone.volto` 5.0.0b1 | |
This is the recommended approach for creating example content in distributions. | |
The old approach of using profiles like `plone.volto:default-homepage` has been deprecated and removed from [`plone.volto` in version 5.0.0b1](https://github.com/plone/plone.volto/blob/main/CHANGES.md#500b1-2024-10-30). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stevepiercy It is correct that the plone.volto:default-homepage
profile was removed from plone.volto, but I think it's noise to mention that here. These docs are for someone creating a new distribution, not someone who is updating an existing distribution that might have referenced that profile.
It's incorrect to say that the old approach of referencing content profiles in the distribution is deprecated. Both approaches for creating example content are still supported. It's fine to say that this one is the recommended one (since it requires less configuration).
I don't understand why any of this is in this particular pull request, which claims to be about adding documentation for an interactive shell, which is unrelated to distributions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a separate PR to clean up the outdated references to the plone.volto:default-homepage profile, so that we can focus on the interactive shell docs here.
# Note: plone.volto:default-homepage profile was removed in version 5 | ||
# Use content export/import instead for example content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, wait a minute. The ADDONS
includes plone.volto==4.0.0a3
, and not 5.0.0b1
or later, making this comment very confusing. @davisagli @ericof @sneridagh @mauritsvanrees can I get some clarification on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a quite old list of version pins which was probably left over from Plone 5 where volto wasn't included. Neither the ADDONS nor PROFILES environment variables should be needed here; the plone-backend image already contains appropriate versions.
When developing or troubleshooting Plone applications in Docker containers, you may need an interactive Python shell with the Plone environment loaded. | ||
This is the Docker equivalent of the `bin/instance debug` command used in traditional Plone installations. | ||
|
||
### Using docker exec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Using docker exec | |
### `docker exec` |
setRequest(app.REQUEST) | ||
``` | ||
|
||
### Exiting the debug console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Exiting the debug console | |
### Exit the debug console |
|
||
### Using docker run | ||
|
||
Alternatively, you can start a new container instance specifically for debugging: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, you can start a new container instance specifically for debugging: | |
Alternatively, start a new container instance specifically for debugging. |
If you have a running Plone container, you can start an interactive shell using `docker exec`: | ||
|
||
```shell | ||
docker exec -it <container_name> /bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docker exec -it <container_name> /bin/bash
docker exec -it <container_name> /bin/bash | |
docker exec -it BACKEND_CONTAINER_NAME /bin/bash |
Once inside the container, you can start the Plone debug console: | ||
|
||
```shell | ||
bin/instance debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a step missing before this one. I followed the instructions in https://6.docs.plone.org/install/containers/index.html through "Access your Plone site" to set up the containers. The bin
directory has all the usual Plone stuff, but no instance
.
docker exec -it plone6-backend /bin/bash
root@9ae16356b1a2:/app# bin/instance debug
bash: bin/instance: No such file or directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within the plone-backend container, the correct command is ./docker-entrypoint.sh console
, not bin/instance debug
. bin/instance debug
would only work with a buildout-based installation, which the plone-backend container does not use.
Then start the debug console: | ||
|
||
```shell | ||
bin/instance debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment. I have no bin/instance
.
## Interactive shell for debugging | ||
|
||
When developing or troubleshooting Plone applications in Docker containers, you may need an interactive Python shell with the Plone environment loaded. | ||
This is the Docker equivalent of the `bin/instance debug` command used in traditional Plone installations. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are multiple traditions for how to install Plone. It'd be clearer to say buildout-based instead of traditional.
Note, we already have documentation for doing this outside the context of a Docker container in https://6.docs.plone.org/admin-guide/run-plone.html#run-a-debug-console where we call it a debug console rather than an interactive shell. I don't care what we call it but we should be consistent.
Once inside the container, you can start the Plone debug console: | ||
|
||
```shell | ||
bin/instance debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Within the plone-backend container, the correct command is ./docker-entrypoint.sh console
, not bin/instance debug
. bin/instance debug
would only work with a buildout-based installation, which the plone-backend container does not use.
|
||
### Accessing the Plone site | ||
|
||
Once in the debug console, you can access your Plone site and perform debugging operations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This information isn't specific to a console that was started in a container. It should go under https://6.docs.plone.org/admin-guide/run-plone.html#run-a-debug-console instead.
@Thanush-03 would you please rebase your branch on |
Issue number
Fixes #1960
Description:
Added documentation for interactive shell debugging when using Docker containers. This provides the Docker equivalent of the bin/instance debug command used in traditional Plone installations.
The new "Interactive shell for debugging" section in the Docker recipes documentation includes:
Multiple approaches for getting an interactive shell:
Using docker exec for running containers
Using docker run for new container instances
Using docker compose exec for Docker Compose setups
Practical examples showing how to access the Plone site and set up fake requests
Safety warnings about using this in production environments.
LINK:
https://6.docs.plone.org/install/containers/recipes/index.html
MESSAGE:
The issue being fixed #1960
Interactive shell debugging documentation was added in Docker recipes page.
📚 Documentation preview 📚: https://plone6--1967.org.readthedocs.build/