@codigodoleo/wp-kit 1.0.0
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 +104 -0
- package/.editorconfig +13 -0
- package/.eslintignore +3 -0
- package/.eslintrc.json +24 -0
- package/.github/workflows/publish-npm.yml +32 -0
- package/.github/workflows/release-please.yml +25 -0
- package/.gitkeep +0 -0
- package/.husky/_/post-merge +0 -0
- package/.prettierignore +4 -0
- package/.prettierrc +8 -0
- package/.vscode/settings.json +19 -0
- package/CHANGELOG.md +47 -0
- package/README.md +115 -0
- package/VSCODE_EXTENSIONS.md +11 -0
- package/bin/index.js +4 -0
- package/docs/HOOKS-SYSTEM.md +172 -0
- package/git-deploy.sh +74 -0
- package/index.php +17 -0
- package/lib/cli.js +15 -0
- package/lib/commands/init.js +132 -0
- package/lib/core/generator.js +261 -0
- package/lib/core/hook-manager.js +172 -0
- package/lib/core/infer-ci-capabilities.js +119 -0
- package/lib/prompts/index.js +105 -0
- package/lib/prompts/loadModulePrompts.js +27 -0
- package/lib/utils/generate-from-template.js +17 -0
- package/lib/utils/git.js +17 -0
- package/lib/utils/logger.js +28 -0
- package/modules/deploy/index.js +39 -0
- package/modules/deploy/prompts.js +27 -0
- package/modules/deploy/templates/.github/workflows/ci.yml.hbs +103 -0
- package/modules/deploy/templates/.gitlab/gitlab-ci.yml.hbs +154 -0
- package/modules/deploy/templates/bitbucket-pipelines.yml.hbs +97 -0
- package/modules/docs/index.js +3 -0
- package/modules/docs/prompts.js +8 -0
- package/modules/docs/templates/README.md.hbs +160 -0
- package/modules/docs/templates/docs/Arquitetura.md +399 -0
- package/modules/docs/templates/docs/Deploy-Pipeline.md +113 -0
- package/modules/docs/templates/docs/Desenvolvimento.md +1116 -0
- package/modules/docs/templates/docs/Getting-Started.md +493 -0
- package/modules/docs/templates/docs/Infraestrutura.md +211 -0
- package/modules/docs/templates/docs/Monitoramento.md +302 -0
- package/modules/docs/templates/docs/Sync-the-Production-DB-with-the-Staging-DB.md +8 -0
- package/modules/docs/templates/docs/Troubleshooting.md +3 -0
- package/modules/git/.commitlintrc.json +136 -0
- package/modules/git/.github/PULL_REQUEST_TEMPLATE.md +42 -0
- package/modules/git/.gitlab/merge_request_templates/default.md +42 -0
- package/modules/git/.gitmessage +29 -0
- package/modules/git/.husky/commit-msg +4 -0
- package/modules/git/.husky/pre-commit +27 -0
- package/modules/git/.lintstagedrc.json +7 -0
- package/modules/git/.vscode/commit-instructions.md +59 -0
- package/modules/git/.vscode/conventional-commits.code-snippets +62 -0
- package/modules/git/.vscode/copilot.json +39 -0
- package/modules/git/docs/CONVENTIONAL-COMMITS.md +131 -0
- package/modules/git/index.js +137 -0
- package/modules/git/prompts.js +23 -0
- package/modules/git/templates/.lando.yml.hbs +13 -0
- package/modules/git/templates/package.json.hbs +15 -0
- package/modules/git/templates/workspace.json.hbs +114 -0
- package/modules/lint/.eslintignore +36 -0
- package/modules/lint/.eslintrc.json +8 -0
- package/modules/lint/.prettierignore +36 -0
- package/modules/lint/.prettierrc.json +29 -0
- package/modules/lint/.stylelintignore +19 -0
- package/modules/lint/.stylelintrc.json +9 -0
- package/modules/lint/index.js +15 -0
- package/modules/lint/pint.json +26 -0
- package/modules/lint/prompts.js +16 -0
- package/modules/lint/templates/.lando.yml.hbs +10 -0
- package/modules/lint/templates/package.json.hbs +16 -0
- package/modules/lint/templates/workspace.json.hbs +56 -0
- package/modules/php/index.js +3 -0
- package/modules/php/prompts.js +8 -0
- package/modules/php/scripts/php-wrapper.sh +38 -0
- package/modules/php/scripts/pint-wrapper.sh +44 -0
- package/modules/php/templates/.lando.yml.hbs +11 -0
- package/modules/php/templates/composer.json.hbs +6 -0
- package/modules/php/templates/workspace.json.hbs +74 -0
- package/modules/redis/prompts.js +8 -0
- package/modules/redis/templates/.lando.yml.hbs +8 -0
- package/modules/sage/index.js +20 -0
- package/modules/sage/prompts.js +16 -0
- package/modules/sage/templates/.lando.yml.hbs +64 -0
- package/modules/sage/templates/theme/composer.json.hbs +18 -0
- package/modules/sage/templates/theme/package.json.hbs +11 -0
- package/modules/sage/templates/theme/style.css.hbs +13 -0
- package/modules/sage/templates/theme/vite.config.js.hbs +53 -0
- package/modules/sage/templates/workspace.json.hbs +67 -0
- package/modules/test-directory/assets/module-file.txt +1 -0
- package/modules/test-directory/index.js +19 -0
- package/modules/test-directory/prompts.js +8 -0
- package/modules/test-directory/test-assets/file1.txt +1 -0
- package/modules/test-directory/test-assets/file2.txt +1 -0
- package/modules/test-directory/test-assets/subfolder/config.json +4 -0
- package/package.json +54 -0
- package/release-please-config.json +17 -0
- package/server/php/php.ini +48 -0
- package/server/www/rocket.conf +283 -0
- package/templates/.editorconfig.hbs +39 -0
- package/templates/.env.hbs +48 -0
- package/templates/.gitignore.hbs +86 -0
- package/templates/.lando.yml.hbs +44 -0
- package/templates/README.md.hbs +12 -0
- package/templates/composer.json.hbs +60 -0
- package/templates/package.json.hbs +47 -0
- package/templates/server/cmd/install-wp.sh.hbs +58 -0
- package/templates/server/www/vhosts.conf.hbs +71 -0
- package/templates/workspace.json.hbs +177 -0
- package/test-copy-directory.js +43 -0
- package/test-overwrite.js +45 -0
- package/wp-config.php +190 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# đ Monitoramento
|
|
2
|
+
|
|
3
|
+
DocumentaÃ§ÃŖo do sistema de monitoramento e observabilidade do Pipefy Website, incluindo mÊtricas, alertas e pontos que necessitam detalhamento pela equipe SRE.
|
|
4
|
+
|
|
5
|
+
## đ¯ **VisÃŖo Geral do Monitoramento**
|
|
6
|
+
|
|
7
|
+
### **Objetivos**
|
|
8
|
+
- Garantir disponibilidade e performance do site
|
|
9
|
+
- Detectar problemas antes que afetem usuÃĄrios
|
|
10
|
+
- Fornecer insights para otimizaÃ§ÃŖo
|
|
11
|
+
- Manter SLAs definidos
|
|
12
|
+
|
|
13
|
+
### **Stack de Observabilidade**
|
|
14
|
+
- **Metrics**: `[SRE_DETAIL: Prometheus, CloudWatch, OCI Monitoring]`
|
|
15
|
+
- **Logs**: `[SRE_DETAIL: ELK Stack, Fluentd, OCI Logging]`
|
|
16
|
+
- **Traces**: `[SRE_DETAIL: Jaeger, Zipkin, ou APM solution]`
|
|
17
|
+
- **Dashboards**: `[SRE_DETAIL: Grafana, OCI Console, ou custom]`
|
|
18
|
+
|
|
19
|
+
## đ **MÊtricas Principais**
|
|
20
|
+
|
|
21
|
+
### **Application Metrics**
|
|
22
|
+
| MÊtrica | Threshold | Alertas | ResponsÃĄvel |
|
|
23
|
+
|---------|-----------|---------|-------------|
|
|
24
|
+
| **Response Time** | `[SRE_DETAIL: < Xs]` | `[SRE_DETAIL: Alert rules]` | Dev Team |
|
|
25
|
+
| **Error Rate** | `[SRE_DETAIL: < X%]` | `[SRE_DETAIL: Alert rules]` | Dev Team |
|
|
26
|
+
| **Throughput** | `[SRE_DETAIL: > X req/s]` | `[SRE_DETAIL: Alert rules]` | SRE Team |
|
|
27
|
+
| **Availability** | `[SRE_DETAIL: > XX.X%]` | `[SRE_DETAIL: Alert rules]` | SRE Team |
|
|
28
|
+
|
|
29
|
+
### **Infrastructure Metrics**
|
|
30
|
+
| Componente | MÊtricas Monitoradas | Thresholds |
|
|
31
|
+
|------------|---------------------|------------|
|
|
32
|
+
| **Kubernetes Pods** | CPU, Memory, Restarts | `[SRE_DETAIL: Limites especÃficos]` |
|
|
33
|
+
| **Database** | Connections, Query time, Locks | `[SRE_DETAIL: Limites especÃficos]` |
|
|
34
|
+
| **Storage** | Disk usage, I/O operations | `[SRE_DETAIL: Limites especÃficos]` |
|
|
35
|
+
| **Network** | Bandwidth, Latency, Packet loss | `[SRE_DETAIL: Limites especÃficos]` |
|
|
36
|
+
|
|
37
|
+
### **Business Metrics**
|
|
38
|
+
- **Page Views**: `[SRE_DETAIL: Tracking method e baseline]`
|
|
39
|
+
- **User Sessions**: `[SRE_DETAIL: Analytics integration]`
|
|
40
|
+
- **Conversion Rate**: `[SRE_DETAIL: Goals e funnels]`
|
|
41
|
+
- **Search Performance**: `[SRE_DETAIL: Internal search metrics]`
|
|
42
|
+
|
|
43
|
+
## đ¨ **Sistema de Alertas**
|
|
44
|
+
|
|
45
|
+
### **NÃveis de Severidade**
|
|
46
|
+
| NÃvel | DescriÃ§ÃŖo | Resposta Esperada | EscalaÃ§ÃŖo |
|
|
47
|
+
|-------|-----------|-------------------|-----------|
|
|
48
|
+
| **P1 - Critical** | Site down, data loss | Imediata (< 15 min) | `[SRE_DETAIL: On-call rotation]` |
|
|
49
|
+
| **P2 - High** | Performance degraded | < 1 hora | `[SRE_DETAIL: Team lead]` |
|
|
50
|
+
| **P3 - Medium** | Minor issues | < 4 horas | `[SRE_DETAIL: Dev team]` |
|
|
51
|
+
| **P4 - Low** | Warnings, capacity | Next business day | `[SRE_DETAIL: Planning]` |
|
|
52
|
+
|
|
53
|
+
### **Canais de NotificaÃ§ÃŖo**
|
|
54
|
+
- **Slack**: `[SRE_DETAIL: Channels configurados (#alerts, #devops)]`
|
|
55
|
+
- **Email**: `[SRE_DETAIL: Distribution lists]`
|
|
56
|
+
- **PagerDuty**: `[SRE_DETAIL: On-call schedule]`
|
|
57
|
+
- **SMS**: `[SRE_DETAIL: Critical alerts only]`
|
|
58
|
+
|
|
59
|
+
### **Alert Rules**
|
|
60
|
+
```
|
|
61
|
+
Site Down (P1):
|
|
62
|
+
- HTTP 5xx > 50% por 2 minutos
|
|
63
|
+
- [SRE_DETAIL: Specific conditions and thresholds]
|
|
64
|
+
|
|
65
|
+
High Response Time (P2):
|
|
66
|
+
- Response time > Xs por 5 minutos
|
|
67
|
+
- [SRE_DETAIL: Specific conditions and thresholds]
|
|
68
|
+
|
|
69
|
+
Database Issues (P1/P2):
|
|
70
|
+
- Connection errors > X%
|
|
71
|
+
- [SRE_DETAIL: Specific conditions and thresholds]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## đ **Dashboards**
|
|
75
|
+
|
|
76
|
+
### **Executive Dashboard**
|
|
77
|
+
- **Uptime**: Overall availability
|
|
78
|
+
- **Performance**: Average response time
|
|
79
|
+
- **User Impact**: Active users, page views
|
|
80
|
+
- **Business KPIs**: `[SRE_DETAIL: Specific business metrics]`
|
|
81
|
+
|
|
82
|
+
### **Operations Dashboard**
|
|
83
|
+
- **Infrastructure Health**: Pods, nodes, storage
|
|
84
|
+
- **Application Performance**: Response times, errors
|
|
85
|
+
- **Security Events**: `[SRE_DETAIL: Security monitoring metrics]`
|
|
86
|
+
- **Deployment Status**: `[SRE_DETAIL: CI/CD pipeline metrics]`
|
|
87
|
+
|
|
88
|
+
### **Development Dashboard**
|
|
89
|
+
- **Error Rates**: By endpoint, feature
|
|
90
|
+
- **Performance Trends**: Historical data
|
|
91
|
+
- **User Experience**: `[SRE_DETAIL: Frontend performance metrics]`
|
|
92
|
+
- **API Usage**: `[SRE_DETAIL: API endpoint metrics]`
|
|
93
|
+
|
|
94
|
+
## đ **Health Checks**
|
|
95
|
+
|
|
96
|
+
### **Application Health Checks**
|
|
97
|
+
| Endpoint | Frequency | Timeout | Expected Response |
|
|
98
|
+
|----------|-----------|---------|-------------------|
|
|
99
|
+
| `/wp-json/wp/v2/` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Xs]` | HTTP 200 |
|
|
100
|
+
| `/wp-admin/admin-ajax.php` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Xs]` | HTTP 200 |
|
|
101
|
+
| `[SRE_DETAIL: Custom endpoint]` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Xs]` | `[SRE_DETAIL: Expected]` |
|
|
102
|
+
|
|
103
|
+
### **External Dependencies**
|
|
104
|
+
- **Database**: `[SRE_DETAIL: Connection check frequency]`
|
|
105
|
+
- **CDN (CloudFlare)**: `[SRE_DETAIL: Edge health monitoring]`
|
|
106
|
+
- **Third-party APIs**: `[SRE_DETAIL: External service monitoring]`
|
|
107
|
+
- **Object Storage**: `[SRE_DETAIL: Storage accessibility check]`
|
|
108
|
+
|
|
109
|
+
### **Kubernetes Health Checks**
|
|
110
|
+
```yaml
|
|
111
|
+
livenessProbe:
|
|
112
|
+
# [SRE_DETAIL: ConfiguraÃ§ÃŖo especÃfica]
|
|
113
|
+
|
|
114
|
+
readinessProbe:
|
|
115
|
+
# [SRE_DETAIL: ConfiguraÃ§ÃŖo especÃfica]
|
|
116
|
+
|
|
117
|
+
startupProbe:
|
|
118
|
+
# [SRE_DETAIL: ConfiguraÃ§ÃŖo especÃfica]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## đ **SLIs e SLOs**
|
|
122
|
+
|
|
123
|
+
### **Service Level Indicators (SLIs)**
|
|
124
|
+
| SLI | MediÃ§ÃŖo | Fonte de Dados |
|
|
125
|
+
|-----|---------|----------------|
|
|
126
|
+
| **Availability** | Successful requests / Total requests | `[SRE_DETAIL: Load balancer logs]` |
|
|
127
|
+
| **Latency** | Response time < Xms | `[SRE_DETAIL: Application metrics]` |
|
|
128
|
+
| **Error Rate** | Error responses / Total responses | `[SRE_DETAIL: Application logs]` |
|
|
129
|
+
| **Throughput** | Requests per second | `[SRE_DETAIL: Ingress metrics]` |
|
|
130
|
+
|
|
131
|
+
### **Service Level Objectives (SLOs)**
|
|
132
|
+
| SLO | Target | Measurement Window | Error Budget |
|
|
133
|
+
|-----|--------|-------------------|--------------|
|
|
134
|
+
| **Availability** | `[SRE_DETAIL: 99.X%]` | 30 days | `[SRE_DETAIL: X hours]` |
|
|
135
|
+
| **Response Time** | `[SRE_DETAIL: XX% < Xs]` | 24 hours | `[SRE_DETAIL: X% budget]` |
|
|
136
|
+
| **Error Rate** | `[SRE_DETAIL: < X%]` | 24 hours | `[SRE_DETAIL: X% budget]` |
|
|
137
|
+
|
|
138
|
+
### **Error Budget Policy**
|
|
139
|
+
- **Budget Remaining > 50%**: `[SRE_DETAIL: Normal operations]`
|
|
140
|
+
- **Budget Remaining 10-50%**: `[SRE_DETAIL: Increased monitoring]`
|
|
141
|
+
- **Budget Remaining < 10%**: `[SRE_DETAIL: Feature freeze policy]`
|
|
142
|
+
|
|
143
|
+
## đ **Security Monitoring**
|
|
144
|
+
|
|
145
|
+
### **Security Events**
|
|
146
|
+
- **Failed Login Attempts**: `[SRE_DETAIL: Threshold e response]`
|
|
147
|
+
- **Unusual Traffic Patterns**: `[SRE_DETAIL: DDoS detection]`
|
|
148
|
+
- **File System Changes**: `[SRE_DETAIL: File integrity monitoring]`
|
|
149
|
+
- **Privilege Escalation**: `[SRE_DETAIL: RBAC violations]`
|
|
150
|
+
|
|
151
|
+
### **Compliance Monitoring**
|
|
152
|
+
- **Access Logs**: `[SRE_DETAIL: Retention policy]`
|
|
153
|
+
- **Data Protection**: `[SRE_DETAIL: GDPR compliance metrics]`
|
|
154
|
+
- **Security Patches**: `[SRE_DETAIL: Vulnerability scanning]`
|
|
155
|
+
- **Certificate Expiration**: `[SRE_DETAIL: SSL monitoring]`
|
|
156
|
+
|
|
157
|
+
## đ **Logging Strategy**
|
|
158
|
+
|
|
159
|
+
### **Log Types**
|
|
160
|
+
| Log Type | Retention | Format | Storage |
|
|
161
|
+
|----------|-----------|--------|---------|
|
|
162
|
+
| **Application Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: JSON/Plain]` | `[SRE_DETAIL: Location]` |
|
|
163
|
+
| **Access Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: Format]` | `[SRE_DETAIL: Location]` |
|
|
164
|
+
| **Error Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: Format]` | `[SRE_DETAIL: Location]` |
|
|
165
|
+
| **Security Logs** | `[SRE_DETAIL: X days]` | `[SRE_DETAIL: Format]` | `[SRE_DETAIL: Location]` |
|
|
166
|
+
|
|
167
|
+
### **Log Aggregation**
|
|
168
|
+
- **Collection**: `[SRE_DETAIL: Fluentd, Filebeat, ou similar]`
|
|
169
|
+
- **Processing**: `[SRE_DETAIL: Logstash, ou stream processing]`
|
|
170
|
+
- **Storage**: `[SRE_DETAIL: Elasticsearch, OCI Logging]`
|
|
171
|
+
- **Visualization**: `[SRE_DETAIL: Kibana, Grafana]`
|
|
172
|
+
|
|
173
|
+
### **Log Analysis**
|
|
174
|
+
- **Error Pattern Detection**: `[SRE_DETAIL: Automated analysis]`
|
|
175
|
+
- **Performance Insights**: `[SRE_DETAIL: Slow query detection]`
|
|
176
|
+
- **Security Analysis**: `[SRE_DETAIL: Threat detection]`
|
|
177
|
+
- **Trend Analysis**: `[SRE_DETAIL: Historical patterns]`
|
|
178
|
+
|
|
179
|
+
## đ **Incident Response**
|
|
180
|
+
|
|
181
|
+
### **Runbooks**
|
|
182
|
+
| CenÃĄrio | Runbook | Owner | Automation Level |
|
|
183
|
+
|---------|---------|-------|------------------|
|
|
184
|
+
| **Site Down** | `[SRE_DETAIL: Link para runbook]` | SRE Team | `[SRE_DETAIL: Manual/Auto]` |
|
|
185
|
+
| **High CPU** | `[SRE_DETAIL: Link para runbook]` | Dev Team | `[SRE_DETAIL: Manual/Auto]` |
|
|
186
|
+
| **Database Issues** | `[SRE_DETAIL: Link para runbook]` | DBA Team | `[SRE_DETAIL: Manual/Auto]` |
|
|
187
|
+
| **Security Incident** | `[SRE_DETAIL: Link para runbook]` | Security Team | `[SRE_DETAIL: Manual/Auto]` |
|
|
188
|
+
|
|
189
|
+
### **Auto-Remediation**
|
|
190
|
+
- **Pod Restart**: `[SRE_DETAIL: Conditions for automatic restart]`
|
|
191
|
+
- **Scale Up**: `[SRE_DETAIL: HPA triggers]`
|
|
192
|
+
- **Cache Clear**: `[SRE_DETAIL: Performance degradation triggers]`
|
|
193
|
+
- **Circuit Breaker**: `[SRE_DETAIL: Dependency failure handling]`
|
|
194
|
+
|
|
195
|
+
### **Escalation Matrix**
|
|
196
|
+
```
|
|
197
|
+
Level 1: On-call Engineer (0-15 min)
|
|
198
|
+
Level 2: Team Lead (15-30 min)
|
|
199
|
+
Level 3: Manager (30-60 min)
|
|
200
|
+
Level 4: Director (60+ min)
|
|
201
|
+
|
|
202
|
+
[SRE_DETAIL: Specific contact information and triggers]
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## đą **Synthetic Monitoring**
|
|
206
|
+
|
|
207
|
+
### **Uptime Monitoring**
|
|
208
|
+
- **External Providers**: `[SRE_DETAIL: Pingdom, StatusCake, etc.]`
|
|
209
|
+
- **Check Frequency**: `[SRE_DETAIL: Interval]`
|
|
210
|
+
- **Global Locations**: `[SRE_DETAIL: Geographic distribution]`
|
|
211
|
+
- **Alert Thresholds**: `[SRE_DETAIL: Failure conditions]`
|
|
212
|
+
|
|
213
|
+
### **User Journey Monitoring**
|
|
214
|
+
- **Critical Paths**: `[SRE_DETAIL: Key user flows to monitor]`
|
|
215
|
+
- **Performance Budgets**: `[SRE_DETAIL: Load time thresholds]`
|
|
216
|
+
- **Browser Testing**: `[SRE_DETAIL: Cross-browser compatibility]`
|
|
217
|
+
- **Mobile Monitoring**: `[SRE_DETAIL: Mobile-specific checks]`
|
|
218
|
+
|
|
219
|
+
## đ¯ **Performance Monitoring**
|
|
220
|
+
|
|
221
|
+
### **Frontend Performance**
|
|
222
|
+
- **Core Web Vitals**: `[SRE_DETAIL: LCP, FID, CLS thresholds]`
|
|
223
|
+
- **Page Load Times**: `[SRE_DETAIL: Measurement tools]`
|
|
224
|
+
- **JavaScript Errors**: `[SRE_DETAIL: Error tracking solution]`
|
|
225
|
+
- **User Experience**: `[SRE_DETAIL: Real User Monitoring]`
|
|
226
|
+
|
|
227
|
+
### **Backend Performance**
|
|
228
|
+
- **API Response Times**: `[SRE_DETAIL: Endpoint-specific SLOs]`
|
|
229
|
+
- **Database Performance**: `[SRE_DETAIL: Query optimization metrics]`
|
|
230
|
+
- **Cache Hit Rates**: `[SRE_DETAIL: CDN and application cache]`
|
|
231
|
+
- **Resource Utilization**: `[SRE_DETAIL: CPU, memory, storage trends]`
|
|
232
|
+
|
|
233
|
+
## đ **Capacity Planning**
|
|
234
|
+
|
|
235
|
+
### **Growth Metrics**
|
|
236
|
+
- **Traffic Trends**: `[SRE_DETAIL: Historical growth patterns]`
|
|
237
|
+
- **Resource Usage**: `[SRE_DETAIL: Infrastructure scaling needs]`
|
|
238
|
+
- **Storage Growth**: `[SRE_DETAIL: Data retention and archival]`
|
|
239
|
+
- **Cost Optimization**: `[SRE_DETAIL: Resource right-sizing]`
|
|
240
|
+
|
|
241
|
+
### **Forecasting**
|
|
242
|
+
- **Predictive Analysis**: `[SRE_DETAIL: Tools and methodologies]`
|
|
243
|
+
- **Seasonal Patterns**: `[SRE_DETAIL: Traffic seasonality]`
|
|
244
|
+
- **Scaling Triggers**: `[SRE_DETAIL: Proactive scaling thresholds]`
|
|
245
|
+
- **Budget Planning**: `[SRE_DETAIL: Infrastructure cost projections]`
|
|
246
|
+
|
|
247
|
+
## đ **Action Items para SRE**
|
|
248
|
+
|
|
249
|
+
### **đ´ CrÃtico (ImplementaÃ§ÃŖo NecessÃĄria)**
|
|
250
|
+
- [ ] Definir e implementar SLOs especÃficos para o site
|
|
251
|
+
- [ ] Configurar alertas crÃticos com thresholds apropriados
|
|
252
|
+
- [ ] Estabelecer on-call rotation e escalation procedures
|
|
253
|
+
- [ ] Implementar health checks abrangentes
|
|
254
|
+
|
|
255
|
+
### **đĄ Importante (Melhoria)**
|
|
256
|
+
- [ ] Configurar dashboards operacionais e executivos
|
|
257
|
+
- [ ] Implementar synthetic monitoring externo
|
|
258
|
+
- [ ] Estabelecer log aggregation e analysis
|
|
259
|
+
- [ ] Criar runbooks para cenÃĄrios comuns
|
|
260
|
+
|
|
261
|
+
### **đĸ DesejÃĄvel (OtimizaÃ§ÃŖo)**
|
|
262
|
+
- [ ] Implementar auto-remediation para problemas comuns
|
|
263
|
+
- [ ] Configurar capacity planning automatizado
|
|
264
|
+
- [ ] Implementar advanced APM solution
|
|
265
|
+
- [ ] Estabelecer chaos engineering practices
|
|
266
|
+
|
|
267
|
+
## đ **Responsabilidades e Contatos**
|
|
268
|
+
|
|
269
|
+
### **Monitoring Ownership**
|
|
270
|
+
- **SRE Team**: Infrastructure metrics, alerting, SLOs
|
|
271
|
+
- **Development Team**: Application metrics, error tracking
|
|
272
|
+
- **Security Team**: Security monitoring, compliance
|
|
273
|
+
- **Business Team**: Business metrics, user experience
|
|
274
|
+
|
|
275
|
+
### **Tools and Access**
|
|
276
|
+
- **Monitoring Tools**: `[SRE_DETAIL: Access management]`
|
|
277
|
+
- **Alert Management**: `[SRE_DETAIL: Who can modify alerts]`
|
|
278
|
+
- **Dashboard Creation**: `[SRE_DETAIL: Self-service capabilities]`
|
|
279
|
+
- **Incident Management**: `[SRE_DETAIL: Incident commander rotation]`
|
|
280
|
+
|
|
281
|
+
## đ **Continuous Improvement**
|
|
282
|
+
|
|
283
|
+
### **Monitoring Review Process**
|
|
284
|
+
- **Monthly SLO Review**: `[SRE_DETAIL: Meeting cadence]`
|
|
285
|
+
- **Alert Tuning**: `[SRE_DETAIL: Noise reduction process]`
|
|
286
|
+
- **Dashboard Optimization**: `[SRE_DETAIL: User feedback integration]`
|
|
287
|
+
- **Tool Evaluation**: `[SRE_DETAIL: Technology refresh cycle]`
|
|
288
|
+
|
|
289
|
+
### **Metrics Evolution**
|
|
290
|
+
- **New Metrics**: `[SRE_DETAIL: Request and approval process]`
|
|
291
|
+
- **Deprecated Metrics**: `[SRE_DETAIL: Sunset process]`
|
|
292
|
+
- **Business Alignment**: `[SRE_DETAIL: KPI alignment reviews]`
|
|
293
|
+
- **Industry Benchmarks**: `[SRE_DETAIL: External comparison]`
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
đ **Ãltima atualizaÃ§ÃŖo**: Junho 2025
|
|
298
|
+
đ **Stack**: `[SRE_DETAIL: Current monitoring stack]`
|
|
299
|
+
đ¨ **Alerting**: `[SRE_DETAIL: Primary alerting system]`
|
|
300
|
+
đ **SLOs**: A serem definidos pela equipe SRE
|
|
301
|
+
đ **Estado**: Necessita implementaÃ§ÃŖo detalhada
|
|
302
|
+
đ¯ **PrÃŗximos passos**: Preenchimento dos `[SRE_DETAIL]` e implementaÃ§ÃŖo das action items
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
1. Inside GitLab:
|
|
2
|
+
|
|
3
|
+
1. Go to [CI/CD -> Schedules](https://git.pipefy.net/wordpress/pipefy-website/-/pipeline_schedules).
|
|
4
|
+
2. Press the play button on the `Download Prod Database` scheduled pipeline.
|
|
5
|
+
1. It'll create a database backup and store it in the S3 bucket.
|
|
6
|
+
3. After finishing the job above, press the play button on the `Replicate Production DB into Staging DB` scheduled pipeline.
|
|
7
|
+
1. That last job uses the database backup inside the S3 bucket
|
|
8
|
+
4. Done! Staging environment's updated now.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["@commitlint/config-conventional"],
|
|
3
|
+
"rules": {
|
|
4
|
+
"type-enum": [
|
|
5
|
+
2,
|
|
6
|
+
"always",
|
|
7
|
+
[
|
|
8
|
+
"feat",
|
|
9
|
+
"fix",
|
|
10
|
+
"docs",
|
|
11
|
+
"style",
|
|
12
|
+
"refactor",
|
|
13
|
+
"perf",
|
|
14
|
+
"test",
|
|
15
|
+
"chore",
|
|
16
|
+
"ci",
|
|
17
|
+
"build",
|
|
18
|
+
"revert",
|
|
19
|
+
"hotfix",
|
|
20
|
+
"release"
|
|
21
|
+
]
|
|
22
|
+
],
|
|
23
|
+
"type-case": [2, "always", "lower-case"],
|
|
24
|
+
"type-empty": [2, "never"],
|
|
25
|
+
"scope-case": [2, "always", "lower-case"],
|
|
26
|
+
"subject-case": [2, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]],
|
|
27
|
+
"subject-empty": [2, "never"],
|
|
28
|
+
"subject-full-stop": [2, "never", "."],
|
|
29
|
+
"header-max-length": [2, "always", 72],
|
|
30
|
+
"body-leading-blank": [1, "always"],
|
|
31
|
+
"body-max-line-length": [2, "always", 100],
|
|
32
|
+
"footer-leading-blank": [1, "always"],
|
|
33
|
+
"footer-max-line-length": [2, "always", 100]
|
|
34
|
+
},
|
|
35
|
+
"prompt": {
|
|
36
|
+
"questions": {
|
|
37
|
+
"type": {
|
|
38
|
+
"description": "Select the type of change that you're committing:",
|
|
39
|
+
"enum": {
|
|
40
|
+
"feat": {
|
|
41
|
+
"description": "A new feature",
|
|
42
|
+
"title": "Features",
|
|
43
|
+
"emoji": "â¨"
|
|
44
|
+
},
|
|
45
|
+
"fix": {
|
|
46
|
+
"description": "A bug fix",
|
|
47
|
+
"title": "Bug Fixes",
|
|
48
|
+
"emoji": "đ"
|
|
49
|
+
},
|
|
50
|
+
"docs": {
|
|
51
|
+
"description": "Documentation only changes",
|
|
52
|
+
"title": "Documentation",
|
|
53
|
+
"emoji": "đ"
|
|
54
|
+
},
|
|
55
|
+
"style": {
|
|
56
|
+
"description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)",
|
|
57
|
+
"title": "Styles",
|
|
58
|
+
"emoji": "đ"
|
|
59
|
+
},
|
|
60
|
+
"refactor": {
|
|
61
|
+
"description": "A code change that neither fixes a bug nor adds a feature",
|
|
62
|
+
"title": "Code Refactoring",
|
|
63
|
+
"emoji": "đĻ"
|
|
64
|
+
},
|
|
65
|
+
"perf": {
|
|
66
|
+
"description": "A code change that improves performance",
|
|
67
|
+
"title": "Performance Improvements",
|
|
68
|
+
"emoji": "đ"
|
|
69
|
+
},
|
|
70
|
+
"test": {
|
|
71
|
+
"description": "Adding missing tests or correcting existing tests",
|
|
72
|
+
"title": "Tests",
|
|
73
|
+
"emoji": "đ¨"
|
|
74
|
+
},
|
|
75
|
+
"build": {
|
|
76
|
+
"description": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)",
|
|
77
|
+
"title": "Builds",
|
|
78
|
+
"emoji": "đ "
|
|
79
|
+
},
|
|
80
|
+
"ci": {
|
|
81
|
+
"description": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)",
|
|
82
|
+
"title": "Continuous Integrations",
|
|
83
|
+
"emoji": "âī¸"
|
|
84
|
+
},
|
|
85
|
+
"chore": {
|
|
86
|
+
"description": "Other changes that don't modify src or test files",
|
|
87
|
+
"title": "Chores",
|
|
88
|
+
"emoji": "âģī¸"
|
|
89
|
+
},
|
|
90
|
+
"revert": {
|
|
91
|
+
"description": "Reverts a previous commit",
|
|
92
|
+
"title": "Reverts",
|
|
93
|
+
"emoji": "đ"
|
|
94
|
+
},
|
|
95
|
+
"hotfix": {
|
|
96
|
+
"description": "Critical fix in production",
|
|
97
|
+
"title": "Hotfixes",
|
|
98
|
+
"emoji": "đ"
|
|
99
|
+
},
|
|
100
|
+
"release": {
|
|
101
|
+
"description": "Release a new version",
|
|
102
|
+
"title": "Releases",
|
|
103
|
+
"emoji": "đ"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"scope": {
|
|
108
|
+
"description": "What is the scope of this change (e.g. component or file name)"
|
|
109
|
+
},
|
|
110
|
+
"subject": {
|
|
111
|
+
"description": "Write a short, imperative tense description of the change"
|
|
112
|
+
},
|
|
113
|
+
"body": {
|
|
114
|
+
"description": "Provide a longer description of the change"
|
|
115
|
+
},
|
|
116
|
+
"isBreaking": {
|
|
117
|
+
"description": "Are there any breaking changes?"
|
|
118
|
+
},
|
|
119
|
+
"breakingBody": {
|
|
120
|
+
"description": "A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself"
|
|
121
|
+
},
|
|
122
|
+
"breaking": {
|
|
123
|
+
"description": "Describe the breaking changes"
|
|
124
|
+
},
|
|
125
|
+
"isIssueAffected": {
|
|
126
|
+
"description": "Does this change affect any open issues?"
|
|
127
|
+
},
|
|
128
|
+
"issuesBody": {
|
|
129
|
+
"description": "If issues are closed, the commit requires a body. Please enter a longer description of the commit itself"
|
|
130
|
+
},
|
|
131
|
+
"issues": {
|
|
132
|
+
"description": "Add issue references (e.g. \"fix #123\", \"re #123\")"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
## đ Description
|
|
2
|
+
|
|
3
|
+
<!-- Briefly describe the changes made -->
|
|
4
|
+
|
|
5
|
+
## đ¯ Change Type
|
|
6
|
+
|
|
7
|
+
- [ ] đ New feature (feat)
|
|
8
|
+
- [ ] đ Bug fix (fix)
|
|
9
|
+
- [ ] đ Documentation (docs)
|
|
10
|
+
- [ ] đ¨ Style improvement (style)
|
|
11
|
+
- [ ] âģī¸ Refactoring (refactor)
|
|
12
|
+
- [ ] ⥠Performance improvement (perf)
|
|
13
|
+
- [ ] đ§Ē Test (test)
|
|
14
|
+
- [ ] đ§ Build configuration (build)
|
|
15
|
+
- [ ] đ CI/CD (ci)
|
|
16
|
+
- [ ] đ§š Maintenance (chore)
|
|
17
|
+
- [ ] đĨ Hotfix (hotfix)
|
|
18
|
+
|
|
19
|
+
## đ Checklist
|
|
20
|
+
|
|
21
|
+
- [ ] Code follows project standards
|
|
22
|
+
- [ ] Tests have been added/updated (if applicable)
|
|
23
|
+
- [ ] Documentation has been updated (if applicable)
|
|
24
|
+
- [ ] Commits follow Conventional Commits pattern
|
|
25
|
+
- [ ] Branch is up to date with base branch
|
|
26
|
+
|
|
27
|
+
## đ§Ē Tests
|
|
28
|
+
|
|
29
|
+
<!-- Describe how to test the changes -->
|
|
30
|
+
|
|
31
|
+
## đ¸ Screenshots (if applicable)
|
|
32
|
+
|
|
33
|
+
<!-- Add screenshots if the change affects the interface -->
|
|
34
|
+
|
|
35
|
+
## đ Related Issues
|
|
36
|
+
|
|
37
|
+
<!-- Link to related issues -->
|
|
38
|
+
Closes #(issue_number)
|
|
39
|
+
|
|
40
|
+
## đ Additional Notes
|
|
41
|
+
|
|
42
|
+
<!-- Additional information that may be useful -->
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
## đ Description
|
|
2
|
+
|
|
3
|
+
<!-- Briefly describe the changes made -->
|
|
4
|
+
|
|
5
|
+
## đ¯ Change Type
|
|
6
|
+
|
|
7
|
+
- [ ] đ New feature (feat)
|
|
8
|
+
- [ ] đ Bug fix (fix)
|
|
9
|
+
- [ ] đ Documentation (docs)
|
|
10
|
+
- [ ] đ¨ Style improvement (style)
|
|
11
|
+
- [ ] âģī¸ Refactoring (refactor)
|
|
12
|
+
- [ ] ⥠Performance improvement (perf)
|
|
13
|
+
- [ ] đ§Ē Test (test)
|
|
14
|
+
- [ ] đ§ Build configuration (build)
|
|
15
|
+
- [ ] đ CI/CD (ci)
|
|
16
|
+
- [ ] đ§š Maintenance (chore)
|
|
17
|
+
- [ ] đĨ Hotfix (hotfix)
|
|
18
|
+
|
|
19
|
+
## đ Checklist
|
|
20
|
+
|
|
21
|
+
- [ ] Code follows project standards
|
|
22
|
+
- [ ] Tests have been added/updated (if applicable)
|
|
23
|
+
- [ ] Documentation has been updated (if applicable)
|
|
24
|
+
- [ ] Commits follow Conventional Commits pattern
|
|
25
|
+
- [ ] Branch is up to date with base branch
|
|
26
|
+
|
|
27
|
+
## đ§Ē Tests
|
|
28
|
+
|
|
29
|
+
<!-- Describe how to test the changes -->
|
|
30
|
+
|
|
31
|
+
## đ¸ Screenshots (if applicable)
|
|
32
|
+
|
|
33
|
+
<!-- Add screenshots if the change affects the interface -->
|
|
34
|
+
|
|
35
|
+
## đ Related Issues
|
|
36
|
+
|
|
37
|
+
<!-- Link to related issues -->
|
|
38
|
+
Closes #(issue_number)
|
|
39
|
+
|
|
40
|
+
## đ Additional Notes
|
|
41
|
+
|
|
42
|
+
<!-- Additional information that may be useful -->
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# <type>(<scope>): <description>
|
|
2
|
+
#
|
|
3
|
+
# <body>
|
|
4
|
+
#
|
|
5
|
+
# <footer>
|
|
6
|
+
|
|
7
|
+
# --- REMOVE THIS LINE AND EVERYTHING BELOW ---
|
|
8
|
+
# Available types:
|
|
9
|
+
# feat: A new feature
|
|
10
|
+
# fix: A bug fix
|
|
11
|
+
# docs: Documentation changes
|
|
12
|
+
# style: Formatting, white-space, etc
|
|
13
|
+
# refactor: Code refactoring
|
|
14
|
+
# perf: Performance improvements
|
|
15
|
+
# test: Adding tests
|
|
16
|
+
# chore: Maintenance tasks
|
|
17
|
+
# ci: CI/CD changes
|
|
18
|
+
# build: Build system changes
|
|
19
|
+
# revert: Revert previous commit
|
|
20
|
+
# hotfix: Critical production fix
|
|
21
|
+
# release: Version release
|
|
22
|
+
#
|
|
23
|
+
# Remember:
|
|
24
|
+
# - Use imperative mood: "add" not "added"
|
|
25
|
+
# - Don't capitalize first letter
|
|
26
|
+
# - No dot (.) at the end
|
|
27
|
+
# - First line up to 72 characters
|
|
28
|
+
# - For BREAKING CHANGES, add "BREAKING CHANGE:" in footer
|
|
29
|
+
# - Reference issues: "Closes #123" or "Fixes #123"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
. "$(dirname "$0")/_/husky.sh"
|
|
3
|
+
|
|
4
|
+
echo "đ Running pre-commit checks..."
|
|
5
|
+
|
|
6
|
+
# Check if lint-staged config exists
|
|
7
|
+
if [ ! -f ".lintstagedrc.json" ]; then
|
|
8
|
+
echo "â .lintstagedrc.json not found, skipping lint-staged"
|
|
9
|
+
exit 0
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
# Check if we have staged files
|
|
13
|
+
if [ -z "$(git diff --cached --name-only)" ]; then
|
|
14
|
+
echo "âšī¸ No staged files, skipping lint-staged"
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
echo "đ Running lint-staged..."
|
|
19
|
+
if command -v lando >/dev/null 2>&1 && lando info >/dev/null 2>&1; then
|
|
20
|
+
echo "đŗ Using Lando environment..."
|
|
21
|
+
lando lint-staged
|
|
22
|
+
else
|
|
23
|
+
echo "đ Using local environment..."
|
|
24
|
+
npx lint-staged
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
echo "â
Pre-commit checks completed!"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Commit Message Instructions for AI Tools
|
|
2
|
+
|
|
3
|
+
When generating commit messages, follow these guidelines:
|
|
4
|
+
|
|
5
|
+
## Format
|
|
6
|
+
```
|
|
7
|
+
<type>(<scope>): <description>
|
|
8
|
+
|
|
9
|
+
<body>
|
|
10
|
+
|
|
11
|
+
<footer>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Rules
|
|
15
|
+
- **First line max 72 characters**
|
|
16
|
+
- **Use imperative mood** ("add" not "added")
|
|
17
|
+
- **Lowercase first letter**
|
|
18
|
+
- **No ending period**
|
|
19
|
+
- **Types**: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert, hotfix, release
|
|
20
|
+
- **Scope**: Optional, use component/file/area affected
|
|
21
|
+
- **Body**: Optional, explain what and why
|
|
22
|
+
- **Footer**: Optional, breaking changes and issue references
|
|
23
|
+
|
|
24
|
+
## Available Types
|
|
25
|
+
- `feat`: A new feature
|
|
26
|
+
- `fix`: A bug fix
|
|
27
|
+
- `docs`: Documentation changes
|
|
28
|
+
- `style`: Formatting, white-space, etc
|
|
29
|
+
- `refactor`: Code refactoring
|
|
30
|
+
- `perf`: Performance improvements
|
|
31
|
+
- `test`: Adding tests
|
|
32
|
+
- `chore`: Maintenance tasks
|
|
33
|
+
- `ci`: CI/CD changes
|
|
34
|
+
- `build`: Build system changes
|
|
35
|
+
- `revert`: Revert previous commit
|
|
36
|
+
- `hotfix`: Critical production fix
|
|
37
|
+
- `release`: Version release
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
- `feat(auth): add user login functionality`
|
|
41
|
+
- `fix(ui): resolve header alignment on mobile`
|
|
42
|
+
- `docs(readme): update installation guide`
|
|
43
|
+
- `style(css): format button component styling`
|
|
44
|
+
- `refactor(api): extract user validation logic`
|
|
45
|
+
- `perf(images): implement lazy loading`
|
|
46
|
+
- `test(auth): add login validation tests`
|
|
47
|
+
- `chore(deps): update dependencies to latest`
|
|
48
|
+
- `ci(github): add automated deployment`
|
|
49
|
+
- `build(webpack): optimize production bundle`
|
|
50
|
+
|
|
51
|
+
## Breaking Changes
|
|
52
|
+
Add `BREAKING CHANGE:` in footer for breaking changes.
|
|
53
|
+
|
|
54
|
+
## Issue References
|
|
55
|
+
Add `Closes #123` or `Fixes #123` in footer for issue references.
|
|
56
|
+
|
|
57
|
+
## AI Generation Prompt
|
|
58
|
+
When using AI tools (Copilot, GitLens), use this prompt:
|
|
59
|
+
"Generate a conventional commit message for the staged changes. Use format: <type>(<scope>): <description>. Available types: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert, hotfix, release. Keep under 72 characters, imperative mood, lowercase, no ending period."
|