Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/plone-deployment/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Plone backend
Postgres 14 database
: Handles data persistence.

You can find this stack at {file}`devops/stacks/ploneconf2025-<your-github-username>.tangrama.com.br.yml`. It's modular, allowing integration of additional services, such as {term}`Varnish`, `Solr`, or `ElasticSearch`.
You can find this stack at {file}`devops/stacks/pybr25-<your-github-username>.tangrama.com.br.yml`. It's modular, allowing integration of additional services, such as {term}`Varnish`, `Solr`, or `ElasticSearch`.

```{seealso}
[Traefik Proxy with HTTPS](https://dockerswarm.rocks/traefik/)
Expand Down Expand Up @@ -69,7 +69,7 @@ Utilize the {file}`Makefile` at {file}`devops/Makefile` for manual deployment.

### Deploy the stack

Execute the following command from your project's {file}`devops/ansible` directory to deploy the stack defined in {file}`devops/stacks/ploneconf2025-<your-github-username>.tangrama.com.br.yml` to the remote server.
Execute the following command from your project's {file}`devops/ansible` directory to deploy the stack defined in {file}`devops/stacks/pybr25-<your-github-username>.tangrama.com.br.yml` to the remote server.

```shell
uv run ansible-playbook playbooks/deploy.yml --tags project
Expand All @@ -80,13 +80,13 @@ uv run ansible-playbook playbooks/deploy.yml --tags project
To check the status of all services in your stack, access the remote server:

```shell
ssh root@ploneconf2025-<your-github-username>.tangrama.com.br
ssh root@pybr25-<your-github-username>.tangrama.com.br
```

And then run the command:

```shell
docker stack ps ploneconf2025-<your-github-username>-tangrama-com-br
docker stack ps pybr25-<your-github-username>-tangrama-com-br
```

### Create Plone site
Expand All @@ -108,7 +108,7 @@ docker service logs traefik_traefik --follow`
```

```{code-block} shell
:caption: frontend
:caption: frontend

docker service logs <stack-name>_frontend --follow`
```
Expand Down Expand Up @@ -162,7 +162,7 @@ Ensure both backend and frontend tests are successful, and images for both serve

1. Go to the project's repository on GitHub.
1. Click the {guilabel}`Actions` tab.
1. Find {guilabel}`Manual Deployment of ploneconf2025-<your-github-username>.tangrama.com.br.yml` and click {guilabel}`Run workflow`.
1. Find {guilabel}`Manual Deployment of pybr25-<your-github-username>.tangrama.com.br.yml` and click {guilabel}`Run workflow`.
1. For {guilabel}`Use workflow from`, select {guilabel}`Branch: main`.
1. Click {guilabel}`Run workflow`.

Expand Down
8 changes: 4 additions & 4 deletions docs/plone-deployment/plone-docker-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ EOT
FROM plone/server-prod-config:${PLONE_VERSION}

LABEL maintainer="Plone Community <[email protected]>" \
org.label-schema.name="ploneconf2025-training-backend" \
org.label-schema.description="Plone Conference Training Backend." \
org.label-schema.name="pybr25-training-backend" \
org.label-schema.description="Tutorial Python Brasil Backend." \
org.label-schema.vendor="Plone Community"

# Copy /app from builder
Expand Down Expand Up @@ -169,8 +169,8 @@ EOT
FROM plone/server-prod-config:uv-${PYTHON_VERSION}

LABEL maintainer="Plone Community <[email protected]>" \
org.label-schema.name="ploneconf2025-training-backend" \
org.label-schema.description="Plone Conference Training Backend." \
org.label-schema.name="pybr25-training-backend" \
org.label-schema.description="Tutorial Python Brasil Backend." \
org.label-schema.vendor="Plone Community"

# Copy the pre-built `/app` directory to the runtime container
Expand Down
32 changes: 17 additions & 15 deletions docs/plone-deployment/project-edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ myst:

# Customize your project

[Please fill this form](https://forms.gle/npDRESAud4ntDnUz7).
[Please fill this form](https://forms.gle/ihYVZxmnypwBnZk39).

Plone offers a wealth of features right out of the box. You can extend these capabilities using {term}`TTW` modifications, such as creating new content types, altering the default workflow, or configuring the top-level navigation. For additional functionalities not covered by Plone, you can either develop your own solutions or integrate existing add-ons.

Expand All @@ -19,11 +19,11 @@ A Plone project is composed by, at least, a backend Python package and a fronten

The packages for this training are:

`ploneconf2025.core`
: Package metadata located at {file}`backend/pyproject.toml` and code at {file}`backend/src/ploneconf2025/core`.
`pybr25.core`
: Package metadata located at {file}`backend/pyproject.toml` and code at {file}`backend/src/pybr25/core`.

`volto-ploneconf2025-core`
: Package metadata located at {file}`frontend/packages/volto-ploneconf2025-core/package.json` and code at {file}`frontend/packages/volto-ploneconf2025-core/src`.
`volto-pybr25-core`
: Package metadata located at {file}`frontend/packages/volto-pybr25-core/package.json` and code at {file}`frontend/packages/volto-pybr25-core/src`.

## Integrate add-ons

Expand Down Expand Up @@ -58,11 +58,11 @@ dependencies = [
]
```

Then we tell Zope to load the add-on run-time configurations by editing {file}`backend/src/ploneconf2025/core/dependencies.zcml` and append `kitconcept.voltolighttheme`.
Then we tell Zope to load the add-on run-time configurations by editing {file}`backend/src/pybr25/core/dependencies.zcml` and append `kitconcept.voltolighttheme`.

```{code-block} xml
:emphasize-lines: 6
:caption: {file}`backend/src/ploneconf2025/core/dependencies.zcml`
:caption: {file}`backend/src/pybr25/core/dependencies.zcml`

<?xml version="1.0" encoding="utf-8"?>
<configure xmlns="http://namespaces.zope.org/zope">
Expand All @@ -73,11 +73,11 @@ Then we tell Zope to load the add-on run-time configurations by editing {file}`b
</configure>
```

And, if we want to have this add-on installed when we create a new website, edit {file}`backend/src/ploneconf2025/core/profiles/default/metadata.xml` and append `profile-kitconcept.voltolighttheme:default`.
And, if we want to have this add-on installed when we create a new website, edit {file}`backend/src/pybr25/core/profiles/default/metadata.xml` and append `profile-kitconcept.voltolighttheme:default`.

```{code-block} xml
:emphasize-lines: 8
:caption: {file}`backend/src/ploneconf2025/core/profiles/default/metadata.xml`
:caption: {file}`backend/src/pybr25/core/profiles/default/metadata.xml`

<?xml version="1.0" encoding="utf-8"?>
<metadata>
Expand All @@ -92,25 +92,27 @@ And, if we want to have this add-on installed when we create a new website, edit
```


#### Frontend: incorporate a new dependency
#### Frontend: incorporate two new dependencies

Edit {file}`frontend/packages/volto-ploneconf2025/package.json` and append `@kitconcept/volto-light-theme` to the `addons` and `dependencies` sections, as shown below:
Edit {file}`frontend/packages/volto-pybr25/package.json`, add `@kitconcept/volto-light-theme` and `@plone-collective/volto-image-editor` to the `addons` and `dependencies` sections, as shown below:

```json
"addons": [
"...more add-ons",
"@plone-collective/volto-image-editor",
"@kitconcept/volto-light-theme"
],
"dependencies": {
"...more dependencies": "*",
"@kitconcept/volto-light-theme": "7.3.1"
"@kitconcept/volto-light-theme": "7.3.1",
"@plone-collective/volto-image-editor": "1.0.0-alpha.1"
}
```

Also, edit the {file}`frontend/volto.config.js` and change the theme to be `@kitconcept/volto-light-theme`:

```js
const addons = ['volto-ploneconf2025'];
const addons = ['volto-pybr25'];
const theme = '@kitconcept/volto-light-theme';

module.exports = {
Expand Down Expand Up @@ -144,7 +146,7 @@ git push

To ensure the behaviors manually applied to the Plone Site persist after the site is re-created, we need to add them via Generic Setup.

Create a new file {file}`backend/src/ploneconf2025/core/profiles/default/types/Plone_Site.xml` with the following content:
Create a new file {file}`backend/src/pybr25/core/profiles/default/types/Plone_Site.xml` with the following content:

```xml
<?xml version="1.0" encoding="utf-8"?>
Expand Down Expand Up @@ -178,7 +180,7 @@ cd backend
make update-example-content
```

Now, if you run `git status` you should see changes to files under {file}`backend/src/ploneconf2025/core/setuphandlers/examplecontent`. This is the location where `plone.exportimport` will look for the content to be for your Plone site upon creation.
Now, if you run `git status` you should see changes to files under {file}`backend/src/pybr25/core/setuphandlers/examplecontent`. This is the location where `plone.exportimport` will look for the content to be for your Plone site upon creation.

Now we are going to add these changes to our repository by running:

Expand Down
34 changes: 17 additions & 17 deletions docs/plone-deployment/project-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ COOKIEPLONE_REPOSITORY_TAG=project-profiles uvx cookieplone project
Answer the prompts as they appear. You can either accept the default values or enter your own.

```{warning}
For participants in the **Plone Conference 2025 Training sessions in Jyväskylä, Finland**, please use at least the following settings:
For participants in the **Tutorial Python Brasil 2025, in São Paulo, Brazil**, please use at least the following settings:

- {guilabel}`Project Title`: **Plone Conference Training**
- {guilabel}`Project Slug`: **ploneconf2025**
- {guilabel}`Project URL`: **ploneconf2025-\<your-github-username\>.tangrama.com.br**
- {guilabel}`Project Title`: **Tutorial Python Brasil**
- {guilabel}`Project Slug`: **pybr25**
- {guilabel}`Project URL`: **pybr25-\<your-github-username\>.tangrama.com.br**
- {guilabel}`Should we use prerelease versions?`: **Y(es)**
- {guilabel}`Volto Version`: **19.0.0-alpha.6**
- {guilabel}`Python Package Name`: **ploneconf2025.core**
- {guilabel}`Python Package Name`: **pybr25.core**
- {guilabel}`Language`: **1**
- {guilabel}`GitHub or GitLab username or organization slug from URL`: **\<your-github-username\>**
- {guilabel}`URL to the repository`: **https:\/\/github.com\/<your-github-username\>/ploneconf2025**
- {guilabel}`URL to the repository`: **https:\/\/github.com\/<your-github-username\>/pybr25**
- {guilabel}`GitHub Container Registry`: **1 - GitHub Container Registry**
- {guilabel}`Which persistent storage to use in the deployment stack?`: **1 - RelStorage with PostgreSQL**
- {guilabel}`Should we setup a caching server`: **Y(es)**
Expand All @@ -50,17 +50,17 @@ An example interaction with the `Cookieplone` wizard is shown below:

```{code-block} console
:emphasize-lines: 1,3,4,7,9,10,13,22,23,25,30,35,39,43,47
[1/20] Project Title (Project Title): Plone Conference Training
[1/20] Project Title (Project Title): Tutorial Python Brasil
[2/20] Project Description (A new project using Plone 6.):
[3/20] Project Slug (Used for repository id) (plone-conference-training): ploneconf2025
[4/20] Project URL (without protocol) (ploneconf2025.example.com): ploneconf2025-<your-github-username>.tangrama.com.br
[3/20] Project Slug (Used for repository id) (plone-conference-training): pybr25
[4/20] Project URL (without protocol) (pybr25.example.com): pybr25-<your-github-username>.tangrama.com.br
[5/20] Author (Plone):
[6/20] Author E-mail ([email protected]):
[7/20] Should we use prerelease versions? (No): Yes
[8/20] Plone Version (6.1.3):
[9/20] Volto Version (19.0.0-alpha.6):
[10/20] Python Package Name (ploneconf2025): ploneconf2025.core
[11/20] Volto Addon Name (volto-ploneconf2025-core):
[10/20] Python Package Name (pybr25): pybr25.core
[11/20] Volto Addon Name (volto-pybr25-core):
[12/20] Language
1 - English
2 - Deutsch
Expand All @@ -72,7 +72,7 @@ An example interaction with the `Cookieplone` wizard is shown below:
8 - Svenska
Choose from [1/2/3/4/5/6/7/8] (1):
[13/20] GitHub or GitLab username or organization slug from URL (collective): <your-github-username>
[14/20] URL to the repository (https://github.com/<your-github-username>/ploneconf2025):
[14/20] URL to the repository (https://github.com/<your-github-username>/pybr25):
[15/20] Container Registry
1 - GitHub Container Registry
2 - Docker Hub
Expand Down Expand Up @@ -104,7 +104,7 @@ An example interaction with the `Cookieplone` wizard is shown below:
Navigate to your project directory:

```shell
cd ploneconf2025
cd pybr25
```

### Understanding the code base
Expand All @@ -131,12 +131,12 @@ Install both the Plone backend and frontend with:
make install
```

This process will take a few minutes. Once completed, a success message will appear. Both the frontend and backend in their respective directories will be built.
This process will take a few minutes. Once completed, a success message will appear. Both the frontend and backend in their respective directories will be built.

For the frontend, the Node.js version will be used that you activated in the previous chapter with `nvm use --lts`. For the backend Python version, uv will check a `requires-python` key in the {file}`pyproject.toml` file.

Putting too specific Node.js and Python versions in the scaffolded project setup can cause other issues.
That's why the project generator gives hints for versions with ranges or `LTS`. But it is your own choice and responsibility to check for the correct major versions of both programming languages are active and available before you run `make install` in the project root or frontend and backend subdirectories for the first time.
That's why the project generator gives hints for versions with ranges or `LTS`. But it is your own choice and responsibility to check for the correct major versions of both programming languages are active and available before you run `make install` in the project root or frontend and backend subdirectories for the first time.

### Code formatting and i18n

Expand Down Expand Up @@ -167,7 +167,7 @@ Visit [GitHub](https://github.com) and log in.

Click the `+` icon in the upper right corner, select `New repository`, and fill in the details:

- {guilabel}`Repository name`: `ploneconf2025`
- {guilabel}`Repository name`: `pybr25`
- {guilabel}`Description`: `Plone Conference 2025 Training`
- {guilabel}`Visibility`: `Public`

Expand Down Expand Up @@ -206,7 +206,7 @@ Connect your local repository to the remote server. First replace `<your-github-
Also set the default branch to `main`.

```shell
git remote add origin [email protected]:<your-github-username>/ploneconf2025.git
git remote add origin [email protected]:<your-github-username>/pybr25.git
git branch -M main
```

Expand Down
8 changes: 4 additions & 4 deletions docs/plone-deployment/project-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Ensure port 80 is free, then initiate the stack with:
make stack-start
```

Docker will download necessary images, build Frontend and Backend images, and initiate all services. Upon completion, a message prompts you to visit [http://ploneconf2025.localhost](http://ploneconf2025.localhost).
Docker will download necessary images, build Frontend and Backend images, and initiate all services. Upon completion, a message prompts you to visit [http://pybr25.localhost](http://pybr25.localhost).

### Checking the Stack Status

Expand All @@ -108,12 +108,12 @@ Re-run `make stack-status`, and both backend and frontend should now display a *

### Accessing the site

Your website is accessible at http://ploneconf2025.localhost.
Your website is accessible at http://pybr25.localhost.

```{figure} _static/start_stack_localhost.png
:alt: Accessing the site at `http://ploneconf2025.localhost`
:alt: Accessing the site at `http://pybr25.localhost`

Accessing the site at `http://ploneconf2025.localhost`
Accessing the site at `http://pybr25.localhost`
```

### Updating the code base
Expand Down
16 changes: 8 additions & 8 deletions docs/plone-deployment/server-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ Customize the {file}`.env` file to match your specific deployment environment. H

```shell
DEPLOY_ENV=prod
DEPLOY_HOST=ploneconf2025-<your-github-username>.tangrama.com.br
DEPLOY_HOST=pybr25-<your-github-username>.tangrama.com.br
DEPLOY_PORT=22
DEPLOY_USER=plone
DOCKER_CONFIG=.docker
STACK_NAME=ploneconf2025-<your-github-username>-tangrama-com-br
STACK_NAME=pybr25-<your-github-username>-tangrama-com-br
```

```{note}
Expand All @@ -58,11 +58,11 @@ Update the {file}`devops/ansible/inventory/hosts.yml` file with the appropriate
---
cluster:
hosts:
ploneconf2025-<your-github-username>.tangrama.com.br:
pybr25-<your-github-username>.tangrama.com.br:
ansible_user: root
ansible_host: ploneconf2025-<your-github-username>.tangrama.com.br
host: ploneconf2025-<your-github-username>
hostname: ploneconf2025-<your-github-username>.tangrama.com.br
ansible_host: pybr25-<your-github-username>.tangrama.com.br
host: pybr25-<your-github-username>
hostname: pybr25-<your-github-username>.tangrama.com.br
swarm_node:
labels:
type: manager
Expand Down Expand Up @@ -91,8 +91,8 @@ This command executes the Ansible playbook {file}`devops/playbooks/setup.yml` pe
You should now be able to SSH into the remote server as both **root** and **plone** users:

```shell
ssh root@ploneconf2025-<your-github-username>.tangrama.com.br
ssh plone@ploneconf2025-<your-github-username>.tangrama.com.br
ssh root@pybr25-<your-github-username>.tangrama.com.br
ssh plone@pybr25-<your-github-username>.tangrama.com.br
```

# Review
Expand Down