@codigodoleo/wp-kit 2.0.4 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cspell.json +5 -25
- package/README.md +127 -2
- package/lib/cli.js +1 -0
- package/lib/commands/init.js +32 -10
- package/lib/config/versions.js +163 -0
- package/lib/core/generator.js +63 -46
- package/lib/core/hook-manager.js +2 -2
- package/lib/core/infer-ci-capabilities.js +13 -24
- package/lib/prompts/index.js +31 -19
- package/lib/prompts/loadModulePrompts.js +4 -2
- package/lib/utils/generate-from-template.js +1 -0
- package/modules/deploy/index.js +34 -7
- package/modules/deploy/prompts.js +5 -5
- package/modules/deploy/templates/.github/workflows/ci.yml.hbs +49 -103
- package/modules/deploy/templates/.gitlab/gitlab-ci.yml.hbs +45 -145
- package/modules/deploy/templates/bitbucket-pipelines.yml.hbs +46 -97
- package/modules/docs/prompts.js +2 -2
- package/modules/docs/templates/README.md.hbs +67 -160
- package/modules/docs/templates/docs/Arquitetura.md +113 -92
- package/modules/docs/templates/docs/Deploy-Pipeline.md +22 -8
- package/modules/docs/templates/docs/Desenvolvimento.md +187 -164
- package/modules/docs/templates/docs/Getting-Started.md +37 -7
- package/modules/docs/templates/docs/Infraestrutura.md +41 -12
- package/modules/docs/templates/docs/Monitoramento.md +83 -45
- package/modules/docs/templates/docs/Sync-the-Production-DB-with-the-Staging-DB.md +6 -7
- package/modules/docs/templates/docs/Troubleshooting.md +1 -1
- package/modules/git/.github/PULL_REQUEST_TEMPLATE.md +1 -0
- package/modules/git/.gitlab/merge_request_templates/default.md +1 -0
- package/modules/git/.vscode/commit-instructions.md +7 -0
- package/modules/git/.vscode/conventional-commits.code-snippets +13 -43
- package/modules/git/docs/CONVENTIONAL-COMMITS.md +14 -14
- package/modules/git/index.js +39 -34
- package/modules/git/prompts.js +4 -4
- package/modules/git/templates/.lando.yml.hbs +5 -13
- package/modules/git/templates/package.json.hbs +4 -15
- package/modules/git/templates/workspace.json.hbs +28 -114
- package/modules/lint/eslint.config.mjs +36 -0
- package/modules/lint/index.js +1 -2
- package/modules/lint/prompts.js +3 -3
- package/modules/lint/templates/.lando.yml.hbs +2 -10
- package/modules/lint/templates/package.json.hbs +4 -16
- package/modules/lint/templates/workspace.json.hbs +15 -56
- package/modules/php/prompts.js +2 -2
- package/modules/php/templates/.lando.yml.hbs +2 -11
- package/modules/php/templates/composer.json.hbs +1 -6
- package/modules/php/templates/workspace.json.hbs +15 -74
- package/modules/redis/prompts.js +2 -2
- package/modules/redis/templates/.lando.yml.hbs +1 -8
- package/modules/sage/index.js +115 -7
- package/modules/sage/prompts.js +3 -3
- package/modules/sage/templates/.lando.yml.hbs +20 -64
- package/modules/sage/templates/theme/composer.json.hbs +3 -18
- package/modules/sage/templates/theme/package.json.hbs +3 -11
- package/modules/sage/templates/theme/style.css.hbs +20 -13
- package/modules/sage/templates/theme/vite.config.js.hbs +13 -53
- package/modules/sage/templates/workspace.json.hbs +12 -67
- package/modules/test-directory/prompts.js +2 -2
- package/package.json +20 -1
- package/templates/.editorconfig.hbs +5 -39
- package/templates/.env.hbs +14 -35
- package/templates/.gitignore.hbs +13 -86
- package/templates/.lando.yml.hbs +11 -44
- package/templates/README.md.hbs +7 -8
- package/templates/composer.json.hbs +12 -60
- package/templates/server/cmd/install-wp.sh.hbs +43 -58
- package/templates/server/www/vhosts.conf.hbs +21 -71
- package/templates/workspace.json.hbs +40 -177
|
@@ -1,160 +1,67 @@
|
|
|
1
|
-
# 🏠 Pipefy WordPress Website
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
#
|
|
30
|
-
lando
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
##
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
|
60
|
-
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
65
|
-
| **
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
| **CDN/DNS** | CloudFlare |
|
|
69
|
-
| **Monitoramento** | Custom health checks |
|
|
70
|
-
|
|
71
|
-
## 📁 **Estrutura do Projeto**
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
pipefy-website/
|
|
75
|
-
├── 📂 dist/ # WordPress core + customizações
|
|
76
|
-
│ └── 📂 wp-content/
|
|
77
|
-
│ ├── 📂 themes/pipefy-2020/ # Tema principal
|
|
78
|
-
│ ├── 📂 plugins/ # Plugins WordPress
|
|
79
|
-
│ └── 📂 mu-plugins/ # Must-use plugins
|
|
80
|
-
├── 📂 development/ # Scripts e config. desenvolvimento
|
|
81
|
-
├── 📂 helm/ # Charts Kubernetes
|
|
82
|
-
├── 📂 k8s/ # Manifests Kubernetes
|
|
83
|
-
├── 📂 terraform/ # Infraestrutura como código
|
|
84
|
-
├── 📂 .gitlab/ # Templates GitLab CI/CD
|
|
85
|
-
├── 📄 .lando.yml # Configuração ambiente local
|
|
86
|
-
├── 📄 .gitlab-ci.yml # Pipeline CI/CD
|
|
87
|
-
└── 📄 CHANGELOG.md # Histórico de mudanças
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## 🌍 **Ambientes**
|
|
91
|
-
|
|
92
|
-
| Ambiente | URL | Branch | Namespace K8s | Finalidade |
|
|
93
|
-
|----------|-----|--------|---------------|------------|
|
|
94
|
-
| **Local** | `pipefy.lndo.site` | `feature/*` | - | Desenvolvimento local |
|
|
95
|
-
| **Development** | `development-www.pipefy.com` | `development` | `website-dev` | Testes contínuos |
|
|
96
|
-
| **Staging** | `staging-www.pipefy.com` | `staging` | `website-stg` | Homologação |
|
|
97
|
-
| **Production** | `www.pipefy.com` | `master` | `website-prod` | Site oficial |
|
|
98
|
-
|
|
99
|
-
## 🔄 **Workflow de Desenvolvimento**
|
|
100
|
-
|
|
101
|
-
```mermaid
|
|
102
|
-
graph LR
|
|
103
|
-
A[Feature Branch] --> B[Pull Request]
|
|
104
|
-
B --> C[Code Review]
|
|
105
|
-
C --> D[Merge to Development]
|
|
106
|
-
D --> E["🚀 development-www.pipefy.com"]
|
|
107
|
-
E --> F[Merge to Staging]
|
|
108
|
-
F --> G["🔍 staging-www.pipefy.com"]
|
|
109
|
-
G --> H[Tests + QA]
|
|
110
|
-
H --> I[Merge to Master]
|
|
111
|
-
I --> J["✅ www.pipefy.com"]
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
## 📚 **Documentação Principal**
|
|
115
|
-
|
|
116
|
-
### 🚀 **Para Desenvolvedores**
|
|
117
|
-
- [Getting Started](Getting-Started) - Setup completo do ambiente
|
|
118
|
-
- [Arquitetura](Arquitetura) - Estrutura técnica detalhada
|
|
119
|
-
- [Desenvolvimento](Desenvolvimento) - Guias de desenvolvimento
|
|
120
|
-
- [Deploy Pipeline](Deploy-Pipeline) - Processo de deploy
|
|
121
|
-
|
|
122
|
-
### 🔧 **Para DevOps**
|
|
123
|
-
- [Infraestrutura](Infraestrutura) - Kubernetes, Terraform, AWS
|
|
124
|
-
- [Monitoramento](Monitoramento) - Health checks e observabilidade
|
|
125
|
-
- [Troubleshooting](Troubleshooting) - Resolução de problemas
|
|
126
|
-
|
|
127
|
-
### 📦 **Para Gestão**
|
|
128
|
-
- [Plugins & Integrações](Plugins-Integracoes) - Componentes externos
|
|
129
|
-
- [Changelog](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md) - Histórico de versões
|
|
130
|
-
- [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS) - Responsabilidades
|
|
131
|
-
|
|
132
|
-
## 🆘 **Precisa de Ajuda?**
|
|
133
|
-
|
|
134
|
-
### 🐛 **Problemas Comuns**
|
|
135
|
-
- [Troubleshooting](Troubleshooting) - Guia de resolução
|
|
136
|
-
- [FAQ](FAQ) - Perguntas frequentes
|
|
137
|
-
|
|
138
|
-
### 📞 **Contatos**
|
|
139
|
-
- **Equipe**: @Approvers (conforme [CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS))
|
|
140
|
-
- **Issues**: [GitLab Issues](https://gitlab.com/pipefy/wordpress/pipefy-website/-/issues)
|
|
141
|
-
- **Pipefy Cards**: Vinculados no [CHANGELOG.md](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md)
|
|
142
|
-
|
|
143
|
-
## 🎯 **Links Importantes**
|
|
144
|
-
|
|
145
|
-
| Recurso | Link | Ambiente |
|
|
146
|
-
|---------|------|----------|
|
|
147
|
-
| **Site Produção** | [www.pipefy.com](https://www.pipefy.com) | 🔴 Production |
|
|
148
|
-
| **Site Staging** | [staging-www.pipefy.com](https://staging-www.pipefy.com) | 🟡 Staging |
|
|
149
|
-
| **Site Development** | [development-www.pipefy.com](https://development-www.pipefy.com) | 🟠 Development |
|
|
150
|
-
| **Site Local** | [pipefy.lndo.site](https://pipefy.lndo.site) | 🔵 Local |
|
|
151
|
-
| **GitLab Project** | [pipefy/wordpress/pipefy-website](https://gitlab.com/pipefy/wordpress/pipefy-website) | - |
|
|
152
|
-
| **CI/CD Pipelines** | [Pipelines](https://gitlab.com/pipefy/wordpress/pipefy-website/-/pipelines) | - |
|
|
153
|
-
| **Kubernetes Dashboards** | *[Links internos conforme ambiente]* | - |
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
📝 **Última atualização**: Junho 2025
|
|
158
|
-
🔄 **Versão da documentação**: 1.1
|
|
159
|
-
✨ **Criado com**: Análise automatizada do projeto + GitHub Copilot
|
|
160
|
-
🌐 **Ambientes atualizados**: Local, Development, Staging, Production
|
|
1
|
+
# 🏠 Pipefy WordPress Website Bem-vindo à documentação oficial do site **pipefy.com** - um projeto
|
|
2
|
+
WordPress robusto e moderno da Pipefy. ## 🎯 **Visão Geral** Este é o repositório principal do site
|
|
3
|
+
institucional da Pipefy, construído com **WordPress** e uma infraestrutura cloud-native moderna. O
|
|
4
|
+
projeto utiliza tecnologias de ponta para garantir performance, escalabilidade e facilidade de
|
|
5
|
+
manutenção. ### 📊 **Status do Projeto** - **Versão Atual**: `1.1.7` (2025-05-23) - **WordPress**:
|
|
6
|
+
Customizado com tema Pipefy 2020 - **Ambiente**: Multi-ambiente (Local, Development, Staging,
|
|
7
|
+
Production) - **Deploy**: Automatizado via GitLab CI/CD + Kubernetes ## 🚀 **Quick Start** ###
|
|
8
|
+
Pré-requisitos - [Lando](https://lando.dev/) (para desenvolvimento local) -
|
|
9
|
+
[Docker](https://docker.com/) - [Git](https://git-scm.com/) - [Node.js](https://nodejs.org/) (versão
|
|
10
|
+
especificada em `.nvmrc`) ### Setup Rápido ```bash # 1. Clone o repositório git clone
|
|
11
|
+
git@gitlab.com:pipefy/wordpress/pipefy-website.git cd pipefy-website # 2. Inicie o ambiente local
|
|
12
|
+
lando start # 3. Configure WordPress lando ssh -c "development/scripts/init-wp.sh
|
|
13
|
+
--user=seu-email@pipefy.com" # 4. Acesse o site # Frontend: https://pipefy.lndo.site # Admin:
|
|
14
|
+
https://pipefy.lndo.site/wp-admin ``` ## 🏗️ **Arquitetura** ``` ┌─────────────────┐
|
|
15
|
+
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Local │────│ Development │────│
|
|
16
|
+
Staging │────│ Production │ │ pipefy.lndo.site│ │development-www │ │ staging-www │ │ www.pipefy.com
|
|
17
|
+
│ │ │ │ .pipefy.com │ │ .pipefy.com │ │ │ └─────────────────┘ └─────────────────┘
|
|
18
|
+
└─────────────────┘ └─────────────────┘ │ │ │ │
|
|
19
|
+
└───────────────────────┼───────────────────────┼───────────────────────┘ │ │ ┌─────────────────┐
|
|
20
|
+
┌─────────────────┐ │ GitLab CI/CD │ │ Kubernetes │ │ Pipelines │ │ + CloudFlare │
|
|
21
|
+
└─────────────────┘ └─────────────────┘ ``` ### 🛠️ **Stack Tecnológico** | Categoria | Tecnologia |
|
|
22
|
+
|-----------|------------| | **CMS** | WordPress (customizado) | | **Tema** | Pipefy 2020 (custom
|
|
23
|
+
theme) | | **Frontend** | PHP, JavaScript, Sass, Gutenberg Blocks | | **Containerização** | Docker,
|
|
24
|
+
Lando | | **Orquestração** | Kubernetes, Helm | | **CI/CD** | GitLab CI/CD | | **Infraestrutura** |
|
|
25
|
+
Terraform, OCI (Oracle Cloud) | | **CDN/DNS** | CloudFlare | | **Monitoramento** | Custom health
|
|
26
|
+
checks | ## 📁 **Estrutura do Projeto** ``` pipefy-website/ ├── 📂 dist/ # WordPress core +
|
|
27
|
+
customizações │ └── 📂 wp-content/ │ ├── 📂 themes/pipefy-2020/ # Tema principal │ ├── 📂 plugins/ #
|
|
28
|
+
Plugins WordPress │ └── 📂 mu-plugins/ # Must-use plugins ├── 📂 development/ # Scripts e config.
|
|
29
|
+
desenvolvimento ├── 📂 helm/ # Charts Kubernetes ├── 📂 k8s/ # Manifests Kubernetes ├── 📂
|
|
30
|
+
terraform/ # Infraestrutura como código ├── 📂 .gitlab/ # Templates GitLab CI/CD ├── 📄 .lando.yml #
|
|
31
|
+
Configuração ambiente local ├── 📄 .gitlab-ci.yml # Pipeline CI/CD └── 📄 CHANGELOG.md # Histórico
|
|
32
|
+
de mudanças ``` ## 🌍 **Ambientes** | Ambiente | URL | Branch | Namespace K8s | Finalidade |
|
|
33
|
+
|----------|-----|--------|---------------|------------| | **Local** | `pipefy.lndo.site` |
|
|
34
|
+
`feature/*` | - | Desenvolvimento local | | **Development** | `development-www.pipefy.com` |
|
|
35
|
+
`development` | `website-dev` | Testes contínuos | | **Staging** | `staging-www.pipefy.com` |
|
|
36
|
+
`staging` | `website-stg` | Homologação | | **Production** | `www.pipefy.com` | `master` |
|
|
37
|
+
`website-prod` | Site oficial | ## 🔄 **Workflow de Desenvolvimento** ```mermaid graph LR A[Feature
|
|
38
|
+
Branch] --> B[Pull Request] B --> C[Code Review] C --> D[Merge to Development] D --> E["🚀
|
|
39
|
+
development-www.pipefy.com"] E --> F[Merge to Staging] F --> G["🔍 staging-www.pipefy.com"] G -->
|
|
40
|
+
H[Tests + QA] H --> I[Merge to Master] I --> J["✅ www.pipefy.com"] ``` ## 📚 **Documentação
|
|
41
|
+
Principal** ### 🚀 **Para Desenvolvedores** - [Getting Started](Getting-Started) - Setup completo do
|
|
42
|
+
ambiente - [Arquitetura](Arquitetura) - Estrutura técnica detalhada -
|
|
43
|
+
[Desenvolvimento](Desenvolvimento) - Guias de desenvolvimento - [Deploy Pipeline](Deploy-Pipeline) -
|
|
44
|
+
Processo de deploy ### 🔧 **Para DevOps** - [Infraestrutura](Infraestrutura) - Kubernetes,
|
|
45
|
+
Terraform, AWS - [Monitoramento](Monitoramento) - Health checks e observabilidade -
|
|
46
|
+
[Troubleshooting](Troubleshooting) - Resolução de problemas ### 📦 **Para Gestão** - [Plugins &
|
|
47
|
+
Integrações](Plugins-Integracoes) - Componentes externos -
|
|
48
|
+
[Changelog](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md) -
|
|
49
|
+
Histórico de versões -
|
|
50
|
+
[CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS) -
|
|
51
|
+
Responsabilidades ## 🆘 **Precisa de Ajuda?** ### 🐛 **Problemas Comuns** -
|
|
52
|
+
[Troubleshooting](Troubleshooting) - Guia de resolução - [FAQ](FAQ) - Perguntas frequentes ### 📞
|
|
53
|
+
**Contatos** - **Equipe**: @Approvers (conforme
|
|
54
|
+
[CODEOWNERS](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CODEOWNERS)) -
|
|
55
|
+
**Issues**: [GitLab Issues](https://gitlab.com/pipefy/wordpress/pipefy-website/-/issues) - **Pipefy
|
|
56
|
+
Cards**: Vinculados no
|
|
57
|
+
[CHANGELOG.md](https://gitlab.com/pipefy/wordpress/pipefy-website/-/blob/master/CHANGELOG.md) ## 🎯
|
|
58
|
+
**Links Importantes** | Recurso | Link | Ambiente | |---------|------|----------| | **Site
|
|
59
|
+
Produção** | [www.pipefy.com](https://www.pipefy.com) | 🔴 Production | | **Site Staging** |
|
|
60
|
+
[staging-www.pipefy.com](https://staging-www.pipefy.com) | 🟡 Staging | | **Site Development** |
|
|
61
|
+
[development-www.pipefy.com](https://development-www.pipefy.com) | 🟠 Development | | **Site Local**
|
|
62
|
+
| [pipefy.lndo.site](https://pipefy.lndo.site) | 🔵 Local | | **GitLab Project** |
|
|
63
|
+
[pipefy/wordpress/pipefy-website](https://gitlab.com/pipefy/wordpress/pipefy-website) | - | |
|
|
64
|
+
**CI/CD Pipelines** | [Pipelines](https://gitlab.com/pipefy/wordpress/pipefy-website/-/pipelines) |
|
|
65
|
+
- | | **Kubernetes Dashboards** | *[Links internos conforme ambiente]* | - | --- 📝 **Última
|
|
66
|
+
atualização**: Junho 2025 🔄 **Versão da documentação**: 1.1 ✨ **Criado com**: Análise automatizada
|
|
67
|
+
do projeto + GitHub Copilot 🌐 **Ambientes atualizados**: Local, Development, Staging, Production
|
|
@@ -14,40 +14,40 @@ graph TB
|
|
|
14
14
|
DEV[Desenvolvedores]
|
|
15
15
|
LOCAL[pipefy.lndo.site<br/>Lando + Docker]
|
|
16
16
|
end
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
subgraph "🔄 CI/CD Pipeline"
|
|
19
19
|
GITLAB[GitLab CI/CD]
|
|
20
20
|
REGISTRY[Container Registry]
|
|
21
21
|
end
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
subgraph "☁️ Cloud Infrastructure"
|
|
24
24
|
CF[CloudFlare<br/>CDN + DNS]
|
|
25
25
|
LB[Load Balancer<br/>OCI]
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
subgraph "🎛️ Kubernetes Cluster"
|
|
28
28
|
K8S_DEV[website-dev<br/>development-www.pipefy.com]
|
|
29
29
|
K8S_STG[website-stg<br/>staging-www.pipefy.com]
|
|
30
30
|
K8S_PROD[website-prod<br/>www.pipefy.com]
|
|
31
31
|
end
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
subgraph "💾 Persistence"
|
|
34
34
|
DB[MySQL Database]
|
|
35
35
|
STORAGE[File Storage]
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
DEV --> LOCAL
|
|
40
40
|
DEV --> GITLAB
|
|
41
41
|
GITLAB --> REGISTRY
|
|
42
42
|
GITLAB --> K8S_DEV
|
|
43
43
|
GITLAB --> K8S_STG
|
|
44
44
|
GITLAB --> K8S_PROD
|
|
45
|
-
|
|
45
|
+
|
|
46
46
|
CF --> LB
|
|
47
47
|
LB --> K8S_DEV
|
|
48
48
|
LB --> K8S_STG
|
|
49
49
|
LB --> K8S_PROD
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
K8S_DEV --> DB
|
|
52
52
|
K8S_STG --> DB
|
|
53
53
|
K8S_PROD --> DB
|
|
@@ -59,86 +59,92 @@ graph TB
|
|
|
59
59
|
## 🛠️ **Stack Tecnológico Detalhado**
|
|
60
60
|
|
|
61
61
|
### **Frontend & CMS**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
|
65
|
-
| **
|
|
66
|
-
| **
|
|
67
|
-
| **
|
|
62
|
+
|
|
63
|
+
| Componente | Tecnologia | Versão | Finalidade |
|
|
64
|
+
| ------------- | ------------------------- | ------ | --------------------------------------- |
|
|
65
|
+
| **CMS** | WordPress | Latest | Sistema de gerenciamento de conteúdo |
|
|
66
|
+
| **Tema** | Pipefy 2020 (Custom) | 1.1.7 | Interface e funcionalidades específicas |
|
|
67
|
+
| **Blocks** | Gutenberg Custom Blocks | - | Blocos personalizados para editores |
|
|
68
|
+
| **Languages** | PHP, JavaScript, CSS/Sass | - | Desenvolvimento frontend/backend |
|
|
68
69
|
|
|
69
70
|
### **Containerização & Orquestração**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
|
73
|
-
| **
|
|
74
|
-
| **
|
|
75
|
-
|
|
|
71
|
+
|
|
72
|
+
| Componente | Tecnologia | Versão | Finalidade |
|
|
73
|
+
| ---------------- | ---------- | ------- | --------------------------------------- |
|
|
74
|
+
| **Containers** | Docker | 20.0+ | Containerização da aplicação |
|
|
75
|
+
| **Orquestração** | Kubernetes | 1.25+ | Gerenciamento de containers em produção |
|
|
76
|
+
| **Dev Local** | Lando | 3.0+ | Ambiente de desenvolvimento local |
|
|
77
|
+
| **🎯 Futuro** | **Helm** | **3.x** | **Gerenciamento de deployments K8s** |
|
|
76
78
|
|
|
77
79
|
### **CI/CD & DevOps**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
|
81
|
-
| **
|
|
82
|
-
| **
|
|
83
|
-
| **
|
|
80
|
+
|
|
81
|
+
| Componente | Tecnologia | Versão | Finalidade |
|
|
82
|
+
| ------------ | ------------------------- | ------ | ------------------------------- |
|
|
83
|
+
| **CI/CD** | GitLab CI/CD | - | Pipeline automatizado |
|
|
84
|
+
| **Registry** | GitLab Container Registry | - | Armazenamento de imagens Docker |
|
|
85
|
+
| **IaC** | Terraform | 1.5+ | Infraestrutura como código |
|
|
86
|
+
| **Secrets** | Kubernetes Secrets | - | Gerenciamento de credenciais |
|
|
84
87
|
|
|
85
88
|
### **Infraestrutura Cloud**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
|
89
|
-
| **
|
|
90
|
-
| **
|
|
91
|
-
| **
|
|
92
|
-
| **
|
|
89
|
+
|
|
90
|
+
| Componente | Tecnologia | Versão | Finalidade |
|
|
91
|
+
| ------------------ | ------------------ | ------ | ---------------------------- |
|
|
92
|
+
| **Cloud Provider** | OCI (Oracle Cloud) | - | Infraestrutura principal |
|
|
93
|
+
| **CDN/DNS** | CloudFlare | - | CDN, DNS e proteção DDoS |
|
|
94
|
+
| **Load Balancer** | OCI Load Balancer | - | Distribuição de tráfego |
|
|
95
|
+
| **Database** | MySQL | 8.0+ | Banco de dados WordPress |
|
|
96
|
+
| **Storage** | OCI Object Storage | - | Arquivos estáticos e uploads |
|
|
93
97
|
|
|
94
98
|
## 🌍 **Ambientes e Namespaces**
|
|
95
99
|
|
|
96
100
|
### **Estrutura de Ambientes**
|
|
101
|
+
|
|
97
102
|
```yaml
|
|
98
103
|
# Kubernetes Namespaces Structure
|
|
99
104
|
environments:
|
|
100
105
|
local:
|
|
101
|
-
url:
|
|
102
|
-
type:
|
|
103
|
-
purpose:
|
|
104
|
-
|
|
106
|
+
url: 'pipefy.lndo.site'
|
|
107
|
+
type: 'Lando Container'
|
|
108
|
+
purpose: 'Desenvolvimento local'
|
|
109
|
+
|
|
105
110
|
development:
|
|
106
|
-
url:
|
|
107
|
-
namespace:
|
|
108
|
-
branch:
|
|
111
|
+
url: 'development-www.pipefy.com'
|
|
112
|
+
namespace: 'website-dev'
|
|
113
|
+
branch: 'development'
|
|
109
114
|
auto_deploy: true
|
|
110
|
-
purpose:
|
|
111
|
-
|
|
115
|
+
purpose: 'Testes contínuos e integração'
|
|
116
|
+
|
|
112
117
|
staging:
|
|
113
|
-
url:
|
|
114
|
-
namespace:
|
|
115
|
-
branch:
|
|
118
|
+
url: 'staging-www.pipefy.com'
|
|
119
|
+
namespace: 'website-stg'
|
|
120
|
+
branch: 'staging'
|
|
116
121
|
auto_deploy: false
|
|
117
|
-
purpose:
|
|
118
|
-
|
|
122
|
+
purpose: 'Homologação e testes finais'
|
|
123
|
+
|
|
119
124
|
production:
|
|
120
|
-
url:
|
|
121
|
-
namespace:
|
|
122
|
-
branch:
|
|
125
|
+
url: 'www.pipefy.com'
|
|
126
|
+
namespace: 'website-prod'
|
|
127
|
+
branch: 'master'
|
|
123
128
|
auto_deploy: false
|
|
124
|
-
purpose:
|
|
129
|
+
purpose: 'Site oficial em produção'
|
|
125
130
|
```
|
|
126
131
|
|
|
127
132
|
### **Recursos por Ambiente**
|
|
128
133
|
|
|
129
|
-
| Recurso
|
|
130
|
-
|
|
131
|
-
| **CPU Requests**
|
|
132
|
-
| **Memory Requests** | 256Mi
|
|
133
|
-
| **CPU Limits**
|
|
134
|
-
| **Memory Limits**
|
|
135
|
-
| **Replicas**
|
|
136
|
-
| **Storage**
|
|
137
|
-
| **Backup**
|
|
134
|
+
| Recurso | Development | Staging | Production |
|
|
135
|
+
| ------------------- | ----------- | ------- | ---------- |
|
|
136
|
+
| **CPU Requests** | 100m | 200m | 500m |
|
|
137
|
+
| **Memory Requests** | 256Mi | 512Mi | 1Gi |
|
|
138
|
+
| **CPU Limits** | 500m | 1 | 2 |
|
|
139
|
+
| **Memory Limits** | 512Mi | 1Gi | 2Gi |
|
|
140
|
+
| **Replicas** | 1 | 1 | 3 |
|
|
141
|
+
| **Storage** | 5Gi | 10Gi | 50Gi |
|
|
142
|
+
| **Backup** | Daily | Daily | Hourly |
|
|
138
143
|
|
|
139
144
|
## 📁 **Estrutura de Arquivos Kubernetes**
|
|
140
145
|
|
|
141
146
|
### **Organização Atual (Kubernetes Nativo)**
|
|
147
|
+
|
|
142
148
|
```
|
|
143
149
|
k8s/
|
|
144
150
|
├── 📂 base/ # Configurações base
|
|
@@ -161,6 +167,7 @@ k8s/
|
|
|
161
167
|
```
|
|
162
168
|
|
|
163
169
|
### **🎯 Estrutura Futura (Helm)**
|
|
170
|
+
|
|
164
171
|
```
|
|
165
172
|
helm/
|
|
166
173
|
├── 📂 pipefy-website/ # Chart principal
|
|
@@ -183,42 +190,44 @@ helm/
|
|
|
183
190
|
## 🔄 **Pipeline de Deploy**
|
|
184
191
|
|
|
185
192
|
### **Workflow Atual (Kubernetes)**
|
|
193
|
+
|
|
186
194
|
```mermaid
|
|
187
195
|
graph LR
|
|
188
196
|
A[Git Push] --> B[GitLab CI/CD]
|
|
189
197
|
B --> C[Build Image]
|
|
190
198
|
C --> D[Push Registry]
|
|
191
199
|
D --> E{Branch?}
|
|
192
|
-
|
|
200
|
+
|
|
193
201
|
E -->|development| F[kubectl apply dev]
|
|
194
202
|
E -->|staging| G[Manual Deploy STG]
|
|
195
203
|
E -->|master| H[Manual Deploy PROD]
|
|
196
|
-
|
|
204
|
+
|
|
197
205
|
F --> I[website-dev namespace]
|
|
198
206
|
G --> J[website-stg namespace]
|
|
199
207
|
H --> K[website-prod namespace]
|
|
200
|
-
|
|
208
|
+
|
|
201
209
|
I --> L[development-www.pipefy.com]
|
|
202
210
|
J --> M[staging-www.pipefy.com]
|
|
203
211
|
K --> N[www.pipefy.com]
|
|
204
212
|
```
|
|
205
213
|
|
|
206
214
|
### **🎯 Pipeline Futuro (Helm)**
|
|
215
|
+
|
|
207
216
|
```mermaid
|
|
208
217
|
graph LR
|
|
209
218
|
A[Git Push] --> B[GitLab CI/CD]
|
|
210
219
|
B --> C[Build Image]
|
|
211
220
|
C --> D[Push Registry]
|
|
212
221
|
D --> E{Branch?}
|
|
213
|
-
|
|
222
|
+
|
|
214
223
|
E -->|development| F[helm upgrade dev]
|
|
215
224
|
E -->|staging| G[helm upgrade stg]
|
|
216
225
|
E -->|master| H[helm upgrade prod]
|
|
217
|
-
|
|
226
|
+
|
|
218
227
|
F --> I[website-dev namespace]
|
|
219
228
|
G --> J[website-stg namespace]
|
|
220
229
|
H --> K[website-prod namespace]
|
|
221
|
-
|
|
230
|
+
|
|
222
231
|
I --> L[development-www.pipefy.com]
|
|
223
232
|
J --> M[staging-www.pipefy.com]
|
|
224
233
|
K --> N[www.pipefy.com]
|
|
@@ -227,6 +236,7 @@ graph LR
|
|
|
227
236
|
## 🛡️ **Segurança e Monitoramento**
|
|
228
237
|
|
|
229
238
|
### **Segurança**
|
|
239
|
+
|
|
230
240
|
- **HTTPS Forçado**: Todos os ambientes com SSL/TLS
|
|
231
241
|
- **CloudFlare Protection**: DDoS protection e WAF
|
|
232
242
|
- **Kubernetes Secrets**: Credenciais criptografadas
|
|
@@ -234,21 +244,22 @@ graph LR
|
|
|
234
244
|
- **RBAC**: Controle de acesso baseado em roles
|
|
235
245
|
|
|
236
246
|
### **Monitoramento**
|
|
247
|
+
|
|
237
248
|
```yaml
|
|
238
249
|
# Health Checks Configurados
|
|
239
250
|
health_checks:
|
|
240
251
|
liveness_probe:
|
|
241
|
-
path:
|
|
252
|
+
path: '/wp-admin/admin-ajax.php'
|
|
242
253
|
interval: 30s
|
|
243
254
|
timeout: 5s
|
|
244
|
-
|
|
255
|
+
|
|
245
256
|
readiness_probe:
|
|
246
|
-
path:
|
|
257
|
+
path: '/wp-json/wp/v2/'
|
|
247
258
|
interval: 10s
|
|
248
259
|
timeout: 3s
|
|
249
|
-
|
|
260
|
+
|
|
250
261
|
startup_probe:
|
|
251
|
-
path:
|
|
262
|
+
path: '/'
|
|
252
263
|
interval: 10s
|
|
253
264
|
timeout: 30s
|
|
254
265
|
```
|
|
@@ -256,40 +267,43 @@ health_checks:
|
|
|
256
267
|
## 🗄️ **Persistência de Dados**
|
|
257
268
|
|
|
258
269
|
### **Banco de Dados**
|
|
270
|
+
|
|
259
271
|
```yaml
|
|
260
272
|
# MySQL Configuration
|
|
261
273
|
database:
|
|
262
|
-
engine:
|
|
263
|
-
storage:
|
|
264
|
-
backup_frequency:
|
|
265
|
-
retention:
|
|
266
|
-
high_availability: true
|
|
267
|
-
|
|
274
|
+
engine: 'MySQL 8.0+'
|
|
275
|
+
storage: 'OCI Block Storage'
|
|
276
|
+
backup_frequency: 'Hourly (Prod) / Daily (Others)'
|
|
277
|
+
retention: '30 days'
|
|
278
|
+
high_availability: true # Produção apenas
|
|
279
|
+
|
|
268
280
|
connection_pooling:
|
|
269
281
|
max_connections: 100
|
|
270
282
|
pool_size: 20
|
|
271
283
|
```
|
|
272
284
|
|
|
273
285
|
### **Armazenamento de Arquivos**
|
|
286
|
+
|
|
274
287
|
```yaml
|
|
275
288
|
# WordPress Uploads & Assets
|
|
276
289
|
file_storage:
|
|
277
|
-
type:
|
|
278
|
-
mount_path:
|
|
279
|
-
access_mode:
|
|
280
|
-
|
|
290
|
+
type: 'OCI Object Storage'
|
|
291
|
+
mount_path: '/app/dist/wp-content/uploads'
|
|
292
|
+
access_mode: 'ReadWriteMany'
|
|
293
|
+
|
|
281
294
|
backup:
|
|
282
|
-
frequency:
|
|
283
|
-
retention:
|
|
284
|
-
|
|
295
|
+
frequency: 'Daily'
|
|
296
|
+
retention: '90 days'
|
|
297
|
+
|
|
285
298
|
cdn_integration:
|
|
286
|
-
provider:
|
|
287
|
-
cache_ttl:
|
|
299
|
+
provider: 'CloudFlare'
|
|
300
|
+
cache_ttl: '1 hour'
|
|
288
301
|
```
|
|
289
302
|
|
|
290
303
|
## 🚀 **Plano de Migração para Helm**
|
|
291
304
|
|
|
292
305
|
### **🎯 Objetivos da Migração**
|
|
306
|
+
|
|
293
307
|
- **Simplificação**: Deploy mais simples com `helm upgrade`
|
|
294
308
|
- **Versionamento**: Controle de versões de releases
|
|
295
309
|
- **Rollback**: Rollback automatizado em caso de problemas
|
|
@@ -297,6 +311,7 @@ file_storage:
|
|
|
297
311
|
- **Ecosystem**: Integração com ecosystem Helm
|
|
298
312
|
|
|
299
313
|
### **📅 Cronograma Planejado**
|
|
314
|
+
|
|
300
315
|
```mermaid
|
|
301
316
|
gantt
|
|
302
317
|
title Migração Kubernetes → Helm
|
|
@@ -314,6 +329,7 @@ gantt
|
|
|
314
329
|
```
|
|
315
330
|
|
|
316
331
|
### **🔄 Estratégia de Migração**
|
|
332
|
+
|
|
317
333
|
1. **Fase 1**: Criação dos Helm Charts baseados nos YAMLs atuais
|
|
318
334
|
2. **Fase 2**: Teste em ambiente de Development
|
|
319
335
|
3. **Fase 3**: Migração Staging com validação completa
|
|
@@ -321,6 +337,7 @@ gantt
|
|
|
321
337
|
5. **Fase 5**: Cleanup dos manifestos K8s antigos
|
|
322
338
|
|
|
323
339
|
### **✅ Benefícios Esperados**
|
|
340
|
+
|
|
324
341
|
- **Deploy**: Redução de 50% no tempo de deploy
|
|
325
342
|
- **Manutenção**: Código mais limpo e organizados
|
|
326
343
|
- **Debugging**: Melhor rastreabilidade de mudanças
|
|
@@ -330,6 +347,7 @@ gantt
|
|
|
330
347
|
## 🔧 **Comandos de Infraestrutura**
|
|
331
348
|
|
|
332
349
|
### **Kubernetes Atual**
|
|
350
|
+
|
|
333
351
|
```bash
|
|
334
352
|
# Deploy para diferentes ambientes
|
|
335
353
|
kubectl apply -f k8s/environments/development/ -n website-dev
|
|
@@ -347,6 +365,7 @@ kubectl describe pod <pod-name> -n website-prod
|
|
|
347
365
|
```
|
|
348
366
|
|
|
349
367
|
### **🎯 Helm Futuro**
|
|
368
|
+
|
|
350
369
|
```bash
|
|
351
370
|
# Deploy usando Helm
|
|
352
371
|
helm upgrade --install pipefy-dev ./helm/pipefy-website -f helm/environments/values-dev.yaml -n website-dev
|
|
@@ -364,14 +383,16 @@ helm rollback pipefy-prod 1 -n website-prod
|
|
|
364
383
|
## 📊 **Métricas e Performance**
|
|
365
384
|
|
|
366
385
|
### **SLAs Definidos**
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
|
370
|
-
| **
|
|
371
|
-
| **
|
|
372
|
-
| **
|
|
386
|
+
|
|
387
|
+
| Métrica | Development | Staging | Production |
|
|
388
|
+
| ----------------- | ----------- | ------- | ---------- |
|
|
389
|
+
| **Uptime** | 95% | 99% | 99.9% |
|
|
390
|
+
| **Response Time** | < 2s | < 1.5s | < 1s |
|
|
391
|
+
| **Error Rate** | < 5% | < 2% | < 0.5% |
|
|
392
|
+
| **Deploy Time** | < 5min | < 10min | < 15min |
|
|
373
393
|
|
|
374
394
|
### **Recursos de Observabilidade**
|
|
395
|
+
|
|
375
396
|
- **Health Checks**: Configurados em todos os pods
|
|
376
397
|
- **Logs Centralizados**: Via GitLab CI/CD logs
|
|
377
398
|
- **Alertas**: Configuração via Kubernetes events
|
|
@@ -396,4 +417,4 @@ helm rollback pipefy-prod 1 -n website-prod
|
|
|
396
417
|
🏗️ **Arquitetura atual**: Kubernetes nativo
|
|
397
418
|
🎯 **Próxima evolução**: Migração para Helm (Q3 2025)
|
|
398
419
|
☁️ **Cloud Provider**: OCI (Oracle Cloud Infrastructure)
|
|
399
|
-
🔄 **Pipeline**: GitLab CI/CD totalmente automatizado
|
|
420
|
+
🔄 **Pipeline**: GitLab CI/CD totalmente automatizado
|