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

Atualiza versões de Plone e Volto #4

Merged
merged 4 commits into from
Sep 27, 2024
Merged
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
70 changes: 35 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,104 +6,104 @@

Solução de Intranet construída com Plone

## Quick Start 🏁
## Início Rápido 🏁

### Prerequisites
### Pré-requisitos

Ensure you have the following installed:
Certifique-se de ter os seguintes itens instalados:

- Python 3.11 🐍
- Node 20 🟩
- pnpm 🧶
- Docker 🐳

### Installation 🔧
### Instalação 🔧

1. Clone the repository:
1. Clone o repositório:

```shell
git clone [email protected]:plonegovbr/portalbrasil-intranet.git
cd portalbrasil-intranet
```

2. Install both Backend and Frontend:
2. Instale tanto o Backend quanto o Frontend:

```shell
make install
```

### Fire Up the Servers 🔥
### Inicialize os Servidores 🔥

1. Create a new Plone site on your first run:
1. Crie um novo site Plone na primeira execução:

```shell
make backend-create-site
```

2. Start the Backend at [http://localhost:8080/](http://localhost:8080/):
2. Inicie o Backend em [http://localhost:8080/](http://localhost:8080/):

```shell
make backend-start
```

3. In a new terminal, start the Frontend at [http://localhost:3000/](http://localhost:3000/):
3. Em um novo terminal, inicie o Frontend em [http://localhost:3000/](http://localhost:3000/):

```shell
make frontend-start
```

Voila! Your Plone site should be live and kicking! 🎉
Voilá! Seu site Plone está no ar e funcionando! 🎉

### Local Stack Deployment 📦
### Implantação Local com Stack 📦

Deploy a local `Docker Compose` environment that includes:
Implemente um ambiente local com `Docker Compose`, incluindo:

- Docker images for Backend and Frontend 🖼️
- A stack with a Traefik router and a Postgres database 🗃️
- Accessible at [http://portalbrasil-intranet.localhost](http://portalbrasil-intranet.localhost) 🌐
- Imagens Docker para Backend e Frontend 🖼️
- Um stack com um roteador Traefik e um banco de dados Postgres 🗃️
- Acessível em [http://portalbrasil-intranet.localhost](http://portalbrasil-intranet.localhost) 🌐

Execute the following:
Execute os seguintes comandos:

```shell
make stack-start
make stack-create-site
```

And... you're all set! Your Plone site is up and running locally! 🚀
E... pronto! Seu site Plone está rodando localmente! 🚀

## Project Structure 🏗️
## Estrutura do Projeto 🏗️

This monorepo consists of three distinct sections: `backend`, `frontend`, and `devops`.
Este monorepo consiste em três seções distintas: `backend`, `frontend` e `devops`.

- **backend**: Houses the API and Plone installation, utilizing pip instead of buildout, and includes a policy package named plonegovbr.intranet.
- **frontend**: Contains the React (Volto) package.
- **devops**: Encompasses Docker Stack, Ansible playbooks, and Cache settings.
- **backend**: Abriga a API e a instalação do Plone, utilizando pip em vez de buildout, e inclui um pacote de políticas chamado plonegovbr.intranet.
- **frontend**: Contém o pacote React (Volto).
- **devops**: Abrange a Stack Docker, playbooks Ansible e configurações de Cache.

### Why This Structure? 🤔
### Por que essa Estrutura? 🤔

- All necessary codebases to run the site are contained within the repo (excluding existing addons for Plone and React).
- Specific GitHub Workflows are triggered based on changes in each codebase (refer to .github/workflows).
- Simplifies the creation of Docker images for each codebase.
- Demonstrates Plone installation/setup without buildout.
- Todo o código necessário para rodar o site está contido no repositório (exceto addons existentes para Plone e React).
- Workflows específicos do GitHub são acionados com base em alterações em cada base de código (consulte .github/workflows).
- Facilita a criação de imagens Docker para cada base de código.
- Demonstra a instalação/configuração do Plone sem o uso do buildout.

## Code Quality Assurance 🧐
## Garantia de Qualidade do Código 🧐

To automatically format your code and ensure it adheres to quality standards, execute:
Para formatar automaticamente seu código e garantir que ele atenda aos padrões de qualidade, execute:

```shell
make check
```

Linters can be run individually within the `backend` or `frontend` folders.
Os linters podem ser executados individualmente dentro das pastas `backend` ou `frontend`.

## Internationalization 🌐
## Internacionalização 🌐

Generate translation files for Plone and Volto with ease:
Gere arquivos de tradução para Plone e Volto com facilidade:

```shell
make i18n
```

## Credits and Acknowledgements 🙏
## Créditos e Agradecimentos 🙏

Crafted with care by **Generated using [Cookieplone (0.7.1)](https://github.com/plone/cookieplone) and [cookiecutter-plone (fee7a07)](https://github.com/plone/cookiecutter-plone/commit/fee7a0706481b17193a86f06cc674017580e0441) on 2024-07-01 18:46:17.428634**. A special thanks to all contributors and supporters!
Criado com carinho usando **[Cookieplone (0.7.1)](https://github.com/plone/cookieplone) e [cookiecutter-plone (fee7a07)](https://github.com/plone/cookiecutter-plone/commit/fee7a0706481b17193a86f06cc674017580e0441) em 01-07-2024 18:46:17.428634**. Um agradecimento especial a todos os colaboradores e apoiadores!
3 changes: 2 additions & 1 deletion backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ dependencies = [
"plone.app.upgrade",
"plone.restapi",
"plone.volto",
"collective.volto.formsupport",
"collective.volto.formsupport>=3.1.4",
"collective.volto.otp",
"collective.taxonomy",
"collective.honeypot",
"collective.bookmarks",
Expand Down
2 changes: 1 addition & 1 deletion backend/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.11
6.0.13
10 changes: 2 additions & 8 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# syntax=docker/dockerfile:1
ARG VOLTO_VERSION
# TODO: Replace with
# FROM plone/frontend-builder:${VOLTO_VERSION}
# when the main image is ready
FROM ghcr.io/kitconcept/frontend-builder:${VOLTO_VERSION} AS builder
FROM plone/frontend-builder:${VOLTO_VERSION} AS builder

COPY --chown=node packages/portalbrasil-intranet /app/packages/portalbrasil-intranet
COPY --chown=node volto.config.js /app/
Expand All @@ -17,10 +14,7 @@ RUN --mount=type=cache,id=pnpm,target=/app/.pnpm-store,uid=1000 <<EOT
pnpm install --prod
EOT

# TODO: Replace with
# FROM plone/frontend-prod-config:${VOLTO_VERSION}
# when the main image is ready
FROM ghcr.io/kitconcept/frontend-prod-config:${VOLTO_VERSION}
FROM plone/frontend-prod-config:${VOLTO_VERSION}

LABEL maintainer="PloneGov-BR <[email protected]>" \
org.label-schema.name="portalbrasil-intranet-frontend" \
Expand Down
2 changes: 1 addition & 1 deletion frontend/mrs.developer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"package": "@plone/volto",
"url": "[email protected]:plone/volto.git",
"https": "https://github.com/plone/volto.git",
"tag": "18.0.0-alpha.41"
"tag": "18.0.0-alpha.43"
}
}
Loading