@codigodoleo/wp-kit 4.0.0 → 5.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/modules/docs/index.js +42 -2
- package/modules/docs/templates/README.md.hbs +33 -160
- package/modules/docs/templates/docs/Arquitetura.md.hbs +74 -388
- package/modules/docs/templates/docs/Deploy-Pipeline.md.hbs +60 -102
- package/modules/docs/templates/docs/Desenvolvimento.md.hbs +87 -1099
- package/modules/docs/templates/docs/Getting-Started.md.hbs +50 -490
- package/modules/docs/templates/docs/Infraestrutura.md.hbs +45 -220
- package/modules/docs/templates/docs/Monitoramento.md.hbs +39 -322
- package/modules/docs/templates/docs/Sync-the-Production-DB-with-the-Staging-DB.md.hbs +68 -7
- package/modules/docs/templates/docs/Troubleshooting.md.hbs +64 -2
- package/modules/mu-plugin/index.js +5 -5
- package/modules/mu-plugin/prompts.js +1 -1
- package/package.json +1 -1
|
@@ -1,523 +1,83 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Getting Started
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Local development setup for **{{projectTitle}}**.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Prerequisites
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
| Tool | Version | Purpose |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| [Lando](https://lando.dev/) | 3.0+ | Local environment orchestration |
|
|
10
|
+
| [Docker](https://docker.com/) | 20.0+ | Container runtime backing Lando |
|
|
11
|
+
| [Git](https://git-scm.com/) | any | Version control |
|
|
12
|
+
| [Node.js](https://nodejs.org/) | {{nodeVersion}}+ | Build pipeline (Vite, lint) |
|
|
13
|
+
| [Composer](https://getcomposer.org/) | 2.x | PHP dependencies |
|
|
8
14
|
|
|
9
|
-
|
|
10
|
-
- **[Docker](https://docker.com/)** (v20.0+) - Containerização
|
|
11
|
-
- **[Git](https://git-scm.com/)** - Controle de versão
|
|
12
|
-
- **Acesso ao GitLab** - Para download do banco de dados
|
|
13
|
-
|
|
14
|
-
### Recomendados
|
|
15
|
-
|
|
16
|
-
- **[Visual Studio Code](https://code.visualstudio.com/)** - Editor recomendado
|
|
17
|
-
- **[GitLab CLI](https://gitlab.com/gitlab-org/cli)** - Para interação com GitLab
|
|
18
|
-
|
|
19
|
-
### Verificação dos Pré-requisitos
|
|
15
|
+
## Clone and bootstrap
|
|
20
16
|
|
|
21
17
|
```bash
|
|
22
|
-
# Verificar instalações
|
|
23
|
-
lando version # v3.0+
|
|
24
|
-
docker --version # v20.0+
|
|
25
|
-
git --version # Qualquer versão recente
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## 🏁 **Setup Inicial**
|
|
29
|
-
|
|
30
|
-
### 1. **Clone do Repositório**
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
# SSH (recomendado)
|
|
34
|
-
git clone {{gitRepository}}
|
|
35
|
-
cd {{projectName}}
|
|
36
|
-
|
|
37
|
-
# HTTPS (alternativo)
|
|
38
18
|
git clone {{repositoryHttpsUrl}}
|
|
39
19
|
cd {{projectName}}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### 2. **📥 Download do Banco de Dados (OBRIGATÓRIO)**
|
|
43
|
-
|
|
44
|
-
**⚠️ Importante**: Antes de inicializar o Lando, você precisa baixar o banco de dados de produção.
|
|
45
|
-
|
|
46
|
-
#### No GitLab:
|
|
47
|
-
|
|
48
|
-
1. **Acesse**: [CI/CD → Schedules]({{repositoryWebUrl}}/-/pipeline_schedules)
|
|
49
|
-
2. **Execute**: Clique no botão ▶️ (play) no pipeline **"Download Prod Database"**
|
|
50
|
-
3. **Aguarde**: O pipeline executar completamente
|
|
51
|
-
4. **Acesse**: Recarregue a página (Ctrl+F5) e clique no **Pipeline ID** na coluna "Last Pipeline"
|
|
52
|
-
5. **Download**: Na aba **"Jobs"**, clique no ícone de download 📥 do artifact
|
|
53
|
-
6. **Extraia**: Descompacte o arquivo baixado
|
|
54
|
-
7. **Mova**: Coloque o arquivo `.sql` na pasta `database/` na raiz do projeto
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
# Estrutura esperada após download
|
|
58
|
-
{{projectName}}/
|
|
59
|
-
├── 📂 database/
|
|
60
|
-
│ └── 📄 production-dump-YYYY-MM-DD.sql # Arquivo baixado
|
|
61
|
-
├── 📄 .lando.yml
|
|
62
|
-
└── ... outros arquivos
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### 3. **Inicialização do Lando**
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
# Inicializar ambiente
|
|
69
|
-
lando start
|
|
70
|
-
|
|
71
|
-
# Verificar status
|
|
72
|
-
lando info
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
### 4. **💾 Restauração do Banco de Dados**
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
# Importar banco de produção ANTES da inicialização
|
|
79
|
-
lando db-import database/production-dump-YYYY-MM-DD.sql
|
|
80
|
-
|
|
81
|
-
# Verificar importação
|
|
82
|
-
lando wp db check
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
### 5. **⚡ Configuração WordPress (Tooling Customizado)**
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
# Usar nosso tooling para inicialização
|
|
89
|
-
lando init-wp --user=seu-email@{{projectName}}.com
|
|
90
|
-
|
|
91
|
-
# Aguardar conclusão da configuração
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### 6. **Verificação do Setup**
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
# Verificar se WordPress está funcionando
|
|
98
|
-
curl -I https://{{projectDomain}}
|
|
99
|
-
|
|
100
|
-
# Deve retornar HTTP/2 200
|
|
101
|
-
|
|
102
|
-
# Verificar se dados de produção estão disponíveis
|
|
103
|
-
lando wp post list --post_type=page --posts_per_page=5
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## 🔄 **Sincronização com Produção**
|
|
107
|
-
|
|
108
|
-
> **📌 Nota Importante**: Sempre que precisar sincronizar seu ambiente local com a produção (dados atualizados, novos conteúdos, etc.), repita os seguintes passos:
|
|
109
|
-
|
|
110
|
-
### Processo de Sincronização:
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
# 1. Download do banco atualizado
|
|
114
|
-
# Repita os passos da seção "Download do Banco de Dados"
|
|
115
|
-
|
|
116
|
-
# 2. Restauração do banco
|
|
117
|
-
lando db-import database/production-dump-NOVA-DATA.sql
|
|
118
|
-
|
|
119
|
-
# 3. Re-inicialização usando nosso tooling
|
|
120
|
-
lando init-wp --user=seu-email@{{projectName}}.com
|
|
121
|
-
|
|
122
|
-
# 4. Verificação
|
|
123
|
-
lando wp post list --post_type=page --posts_per_page=5
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Quando Sincronizar:
|
|
127
|
-
|
|
128
|
-
- **🗓️ Semanalmente**: Para ter conteúdo sempre atualizado
|
|
129
|
-
- **🚀 Antes de features**: Que dependem de dados específicos de produção
|
|
130
|
-
- **🔧 Troubleshooting**: Quando houver problemas com dados locais
|
|
131
|
-
- **📊 Testes**: Quando precisar testar com dados reais
|
|
132
|
-
|
|
133
|
-
## 🌐 **Acessos Locais**
|
|
134
|
-
|
|
135
|
-
| Serviço | URL | Credenciais |
|
|
136
|
-
| ------------------------- | ---------------------------------------------------------------------- | ------------------ |
|
|
137
|
-
| **Site Frontend** | [https://{{projectDomain}}](https://{{projectDomain}}) | - |
|
|
138
|
-
| **WordPress Admin** | [https://{{projectDomain}}/wp-admin](https://{{projectDomain}}/wp-admin) | Definidas no setup |
|
|
139
|
-
| **Database (phpMyAdmin)** | [https://{{projectDomain}}:8080](https://{{projectDomain}}:8080) | Ver `.lando.yml` |
|
|
140
|
-
| **MailHog** | [https://{{projectDomain}}:8025](https://{{projectDomain}}:8025) | - |
|
|
141
|
-
|
|
142
|
-
## 🛠️ **Comandos Essenciais**
|
|
143
|
-
|
|
144
|
-
### Lando Básico
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
# Iniciar ambiente
|
|
148
|
-
lando start
|
|
149
|
-
|
|
150
|
-
# Parar ambiente
|
|
151
|
-
lando stop
|
|
152
|
-
|
|
153
|
-
# Reiniciar ambiente
|
|
154
|
-
lando restart
|
|
155
|
-
|
|
156
|
-
# Reconstruir ambiente (quando mudar .lando.yml)
|
|
157
|
-
lando rebuild
|
|
158
|
-
|
|
159
|
-
# Destruir ambiente
|
|
160
|
-
lando destroy
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### ⚡ **Toolings Customizados (Configurados no .lando.yml)**
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
# Inicialização completa do WordPress
|
|
167
|
-
lando init-wp --user=seu-email@{{projectName}}.com
|
|
168
|
-
|
|
169
|
-
# Acesso ao bash do container
|
|
170
|
-
lando bash
|
|
171
|
-
|
|
172
|
-
# Logs em tempo real
|
|
173
|
-
lando logs-live
|
|
174
|
-
|
|
175
|
-
# Backup rápido do banco
|
|
176
|
-
lando backup-db
|
|
177
|
-
|
|
178
|
-
# Limpeza de cache
|
|
179
|
-
lando clear-cache
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
### WordPress via Lando
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
# WP-CLI (todas as ferramentas dentro do container)
|
|
186
|
-
lando wp --help
|
|
187
|
-
lando wp user list
|
|
188
|
-
lando wp plugin list
|
|
189
|
-
|
|
190
|
-
# Logs
|
|
191
|
-
lando logs
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
### Database
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
# Backup usando nosso tooling
|
|
198
|
-
lando backup-db
|
|
199
|
-
|
|
200
|
-
# Restaurar banco específico
|
|
201
|
-
lando db-import database/production-dump-YYYY-MM-DD.sql
|
|
202
|
-
|
|
203
|
-
# Acesso direto ao MySQL
|
|
204
|
-
lando mysql
|
|
205
|
-
|
|
206
|
-
# Verificar integridade do banco
|
|
207
|
-
lando wp db check
|
|
208
|
-
|
|
209
|
-
# Reparar tabelas (se necessário)
|
|
210
|
-
lando wp db repair
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
### Ferramentas de Build
|
|
214
|
-
|
|
215
|
-
```bash
|
|
216
|
-
# Node.js/NPM dentro do container
|
|
217
|
-
lando node --version
|
|
218
|
-
lando npm --version
|
|
219
|
-
|
|
220
|
-
# Build usando nossos toolings (se configurado)
|
|
221
|
-
lando build-theme
|
|
222
|
-
lando watch-theme
|
|
223
|
-
|
|
224
|
-
# Ou comandos tradicionais para o tema
|
|
225
|
-
lando bash -c "cd /app/dist/wp-content/themes/{{projectThemeSlug}} && npm install"
|
|
226
|
-
lando bash -c "cd /app/dist/wp-content/themes/{{projectThemeSlug}} && npm run dev"
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## 📁 **Estrutura de Desenvolvimento**
|
|
230
|
-
|
|
231
|
-
### Arquivos Importantes
|
|
232
|
-
|
|
233
|
-
```
|
|
234
|
-
{{projectName}}/
|
|
235
|
-
├── 📄 .lando.yml # ⭐ Configuração com toolings customizados
|
|
236
|
-
├── 📄 .env.example # Variáveis de ambiente exemplo
|
|
237
|
-
├── 📂 database/ # Dumps do banco de dados
|
|
238
|
-
│ ├── 📄 production-dump-2025-06-05.sql
|
|
239
|
-
│ ├── 📄 production-dump-2025-05-29.sql
|
|
240
|
-
│ └── 📄 backup-local.sql
|
|
241
|
-
├── 📂 development/
|
|
242
|
-
│ ├── 📄 config/ # Configurações específicas
|
|
243
|
-
│ └── 📄 scripts/ # Scripts de automação (usados pelos toolings)
|
|
244
|
-
├── 📂 dist/ # WordPress core
|
|
245
|
-
│ └── 📂 wp-content/
|
|
246
|
-
│ ├── 📂 themes/{{projectThemeSlug}}/ # Tema principal
|
|
247
|
-
│ ├── 📂 plugins/ # Plugins
|
|
248
|
-
│ └── 📂 uploads/ # Media files
|
|
249
|
-
└── 📂 logs/ # Logs locais
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### Workflow de Desenvolvimento
|
|
253
|
-
|
|
254
|
-
```bash
|
|
255
|
-
# 1. Sincronizar com produção (quando necessário)
|
|
256
|
-
# Baixar nova versão via GitLab CI/CD → Schedules
|
|
257
|
-
lando db-import database/production-dump-YYYY-MM-DD.sql
|
|
258
|
-
|
|
259
|
-
# 2. Criar nova feature
|
|
260
|
-
git checkout development
|
|
261
|
-
git pull origin development
|
|
262
|
-
git checkout -b feature/nova-funcionalidade
|
|
263
|
-
|
|
264
|
-
# 3. Desenvolver localmente
|
|
265
|
-
# Fazer alterações nos arquivos
|
|
266
|
-
# Usar nossos toolings para build/watch se necessário
|
|
267
|
-
lando watch-theme # Se configurado
|
|
268
|
-
|
|
269
|
-
# 4. Testar em https://{{projectDomain}}
|
|
270
|
-
|
|
271
|
-
# 5. Commit e push
|
|
272
|
-
git add .
|
|
273
|
-
git commit -m "feat: adicionar nova funcionalidade"
|
|
274
|
-
git push origin feature/nova-funcionalidade
|
|
275
|
-
|
|
276
|
-
# 6. Criar Merge Request
|
|
277
|
-
# Via GitLab interface ou CLI
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
## 🔧 **Configurações Avançadas**
|
|
281
|
-
|
|
282
|
-
### Variáveis de Ambiente
|
|
283
|
-
|
|
284
|
-
```bash
|
|
285
|
-
# Copiar arquivo exemplo
|
|
286
|
-
cp .env.example .env
|
|
287
|
-
|
|
288
|
-
# Editar conforme necessário
|
|
289
|
-
nano .env
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
### Customizar .lando.yml (se necessário)
|
|
293
|
-
|
|
294
|
-
```yaml
|
|
295
|
-
# Exemplo de override local
|
|
296
|
-
# .lando.local.yml
|
|
297
|
-
services:
|
|
298
|
-
appserver:
|
|
299
|
-
xdebug: true
|
|
300
|
-
config:
|
|
301
|
-
php: development/config/php.ini
|
|
302
|
-
|
|
303
|
-
# Adicionar novos toolings
|
|
304
|
-
tooling:
|
|
305
|
-
meu-comando:
|
|
306
|
-
service: appserver
|
|
307
|
-
cmd: /app/development/scripts/meu-script.sh
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
### Xdebug (Debugging)
|
|
311
|
-
|
|
312
|
-
```bash
|
|
313
|
-
# Habilitar Xdebug
|
|
314
|
-
lando xdebug-on
|
|
315
|
-
|
|
316
|
-
# Desabilitar Xdebug
|
|
317
|
-
lando xdebug-off
|
|
318
|
-
|
|
319
|
-
# Status do Xdebug
|
|
320
|
-
lando php -m | grep xdebug
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
## 🎨 **Desenvolvimento do Tema**
|
|
324
|
-
|
|
325
|
-
### Estrutura do Tema {{projectTitle}} Theme
|
|
326
|
-
|
|
327
|
-
```
|
|
328
|
-
themes/{{projectThemeSlug}}/
|
|
329
|
-
├── 📄 style.css # CSS principal
|
|
330
|
-
├── 📄 functions.php # Funções do tema
|
|
331
|
-
├── 📄 index.php # Template principal
|
|
332
|
-
├── 📂 assets/ # CSS, JS, imagens
|
|
333
|
-
├── 📂 blocks/ # Blocos Gutenberg customizados
|
|
334
|
-
├── 📂 inc/ # Includes e utilitários
|
|
335
|
-
└── 📂 templates/ # Templates de página
|
|
336
|
-
```
|
|
337
|
-
|
|
338
|
-
### Build Process (usando nossos toolings)
|
|
339
|
-
|
|
340
|
-
```bash
|
|
341
|
-
# Usar toolings customizados (se configurados)
|
|
342
|
-
lando build-theme # Build de produção
|
|
343
|
-
lando watch-theme # Watch para desenvolvimento
|
|
344
|
-
lando clear-cache # Limpeza de cache
|
|
345
|
-
|
|
346
|
-
# Ou acesso direto ao bash
|
|
347
|
-
lando bash
|
|
348
|
-
|
|
349
|
-
# Dentro do container
|
|
350
|
-
cd /app/dist/wp-content/themes/{{projectThemeSlug}}/
|
|
351
|
-
npm install
|
|
352
|
-
npm run dev
|
|
353
|
-
npm run watch
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
## 🧪 **Testes Locais**
|
|
357
|
-
|
|
358
|
-
### Verificações de Saúde
|
|
359
|
-
|
|
360
|
-
```bash
|
|
361
|
-
# Testar URLs principais
|
|
362
|
-
curl -I https://{{projectDomain}}/
|
|
363
|
-
curl -I https://{{projectDomain}}/wp-admin/
|
|
364
|
-
|
|
365
|
-
# Verificar plugins ativos
|
|
366
|
-
lando wp plugin list --status=active
|
|
367
|
-
|
|
368
|
-
# Verificar temas
|
|
369
|
-
lando wp theme list
|
|
370
|
-
|
|
371
|
-
# Verificar se dados de produção foram importados
|
|
372
|
-
lando wp post list --post_type=page --posts_per_page=5
|
|
373
|
-
|
|
374
|
-
# Verificar URLs internas (devem apontar para local)
|
|
375
|
-
lando wp option get home
|
|
376
|
-
lando wp option get siteurl
|
|
377
|
-
```
|
|
378
|
-
|
|
379
|
-
### Performance Local
|
|
380
|
-
|
|
381
|
-
```bash
|
|
382
|
-
# Verificar queries pesadas (Query Monitor plugin)
|
|
383
|
-
# Acessar: https://{{projectDomain}}/?qm_debug=1
|
|
384
|
-
|
|
385
|
-
# Logs de erro PHP usando nosso tooling
|
|
386
|
-
lando logs-live
|
|
387
|
-
|
|
388
|
-
# Logs WordPress específicos
|
|
389
|
-
lando bash -c "tail -f /app/dist/wp-content/debug.log"
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
## 🆘 **Troubleshooting Comum**
|
|
393
|
-
|
|
394
|
-
### Problemas com Banco de Dados
|
|
395
|
-
|
|
396
|
-
```bash
|
|
397
|
-
# Erro na importação
|
|
398
|
-
lando db-import database/dump.sql --no-autocommit
|
|
399
|
-
|
|
400
|
-
# Banco corrompido
|
|
401
|
-
lando mysql -e "REPAIR TABLE wp_posts;"
|
|
402
|
-
|
|
403
|
-
# URLs erradas após importação
|
|
404
|
-
lando wp search-replace '{{projectProductionDomain}}' '{{projectDomain}}'
|
|
405
|
-
lando wp search-replace 'https://{{projectProductionDomain}}' 'https://{{projectDomain}}'
|
|
406
|
-
|
|
407
|
-
# Reset completo usando nossos toolings
|
|
408
|
-
lando destroy -y
|
|
409
20
|
lando start
|
|
410
|
-
lando db-import database/production-dump-YYYY-MM-DD.sql
|
|
411
|
-
lando init-wp --user=seu-email@{{projectName}}.com
|
|
412
21
|
```
|
|
413
22
|
|
|
414
|
-
|
|
23
|
+
The first `lando start` provisions containers, installs WordPress core
|
|
24
|
+
via Composer ({{wpCoreVersion}}), and writes salts into `.env`. Expect
|
|
25
|
+
3–5 minutes the first time, well under a minute on subsequent boots.
|
|
415
26
|
|
|
416
|
-
|
|
417
|
-
# Regenerar certificados SSL
|
|
418
|
-
lando poweroff
|
|
419
|
-
lando start
|
|
27
|
+
Once it finishes, the dev URL is **https://{{projectDomain}}**.
|
|
420
28
|
|
|
421
|
-
|
|
422
|
-
lando info | grep ssl
|
|
423
|
-
```
|
|
29
|
+
## Database
|
|
424
30
|
|
|
425
|
-
|
|
31
|
+
Lando ships an empty MariaDB. To work against a real dataset, refresh
|
|
32
|
+
from staging:
|
|
426
33
|
|
|
427
34
|
```bash
|
|
428
|
-
#
|
|
429
|
-
lando
|
|
35
|
+
# 1. Pull the staging dump (see Sync doc for how the dump gets produced)
|
|
36
|
+
lando db-import path/to/staging-dump.sql.gz
|
|
430
37
|
|
|
431
|
-
#
|
|
432
|
-
lando
|
|
433
|
-
lando bash -c "find /app/dist/ -type d -exec chmod 755 {} \;"
|
|
434
|
-
lando bash -c "chmod 600 /app/dist/wp-config.php"
|
|
38
|
+
# 2. Run search-replace so URLs point at the Lando URL
|
|
39
|
+
lando wp search-replace 'https://{{projectStagingDomain}}' 'https://{{projectDomain}}'
|
|
435
40
|
```
|
|
436
41
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
```bash
|
|
440
|
-
# Usar nosso tooling para limpeza
|
|
441
|
-
lando clear-cache
|
|
42
|
+
{{#if useSage}}
|
|
43
|
+
## Theme build
|
|
442
44
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
# Limpar cache do navegador
|
|
447
|
-
# Ctrl+Shift+R (hard refresh)
|
|
448
|
-
|
|
449
|
-
# Rebuild completo do Lando
|
|
450
|
-
lando rebuild -y
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
### Debug e Logs
|
|
45
|
+
The Sage theme lives under `content/themes/{{projectName}}`. Vite drives
|
|
46
|
+
the asset pipeline:
|
|
454
47
|
|
|
455
48
|
```bash
|
|
456
|
-
#
|
|
457
|
-
lando
|
|
458
|
-
|
|
459
|
-
# Logs específicos
|
|
460
|
-
lando bash -c "tail -f /var/log/apache2/error.log"
|
|
461
|
-
lando bash -c "tail -f /app/dist/wp-content/debug.log"
|
|
462
|
-
|
|
463
|
-
# Verificar configuração PHP
|
|
464
|
-
lando bash -c "php -i | grep -i memory"
|
|
49
|
+
lando theme-dev # HMR dev server
|
|
50
|
+
lando theme-build # Production build
|
|
465
51
|
```
|
|
52
|
+
{{/if}}
|
|
466
53
|
|
|
467
|
-
##
|
|
468
|
-
|
|
469
|
-
Confira todos os toolings configurados no nosso `.lando.yml`:
|
|
54
|
+
## Common commands
|
|
470
55
|
|
|
471
56
|
```bash
|
|
472
|
-
#
|
|
473
|
-
lando
|
|
474
|
-
|
|
475
|
-
#
|
|
476
|
-
|
|
477
|
-
# -
|
|
478
|
-
|
|
479
|
-
#
|
|
480
|
-
# - lando clear-cache # Limpeza de cache
|
|
481
|
-
# - lando build-theme # Build do tema (se configurado)
|
|
482
|
-
# - lando watch-theme # Watch do tema (se configurado)
|
|
483
|
-
# - lando fix-permissions # Correção de permissões (se configurado)
|
|
57
|
+
lando start # Boot containers
|
|
58
|
+
lando stop # Stop containers
|
|
59
|
+
lando restart # Restart (useful after .lando.yml changes)
|
|
60
|
+
lando rebuild # Full rebuild (after Docker config changes)
|
|
61
|
+
lando logs # Tail container logs
|
|
62
|
+
lando wp <command> # Run WP-CLI against the Lando WordPress
|
|
63
|
+
lando ssh # Shell into the appserver
|
|
64
|
+
lando destroy # Wipe containers (data is preserved on disk)
|
|
484
65
|
```
|
|
485
66
|
|
|
486
|
-
##
|
|
487
|
-
|
|
488
|
-
Após completar o setup, verifique:
|
|
489
|
-
|
|
490
|
-
- [ ] ✅ **Banco baixado** da produção via GitLab CI/CD
|
|
491
|
-
- [ ] ✅ **Banco restaurado** ANTES da inicialização
|
|
492
|
-
- [ ] ✅ **WordPress inicializado** com `lando init-wp`
|
|
493
|
-
- [ ] ✅ **Site carrega** em `https://{{projectDomain}}`
|
|
494
|
-
- [ ] ✅ **Admin acessível** em `https://{{projectDomain}}/wp-admin`
|
|
495
|
-
- [ ] ✅ **Tema {{projectTitle}} Theme** ativo
|
|
496
|
-
- [ ] ✅ **Plugins principais** instalados
|
|
497
|
-
- [ ] ✅ **Dados de produção** visíveis (posts, páginas)
|
|
498
|
-
- [ ] ✅ **URLs corretas** (apontando para local)
|
|
499
|
-
- [ ] ✅ **Sem erros** no console do navegador
|
|
500
|
-
- [ ] ✅ **Emails capturados** no MailHog
|
|
501
|
-
|
|
502
|
-
## 🎯 **Próximos Passos**
|
|
503
|
-
|
|
504
|
-
Agora que seu ambiente está funcionando:
|
|
67
|
+
## Editor setup
|
|
505
68
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
69
|
+
This project ships a multi-root VS Code workspace at
|
|
70
|
+
`{{projectName}}.code-workspace`. Recommended extensions are pinned in
|
|
71
|
+
`.vscode/extensions.json` — VS Code prompts to install them on first
|
|
72
|
+
open.
|
|
509
73
|
|
|
510
|
-
##
|
|
74
|
+
## What to read next
|
|
511
75
|
|
|
512
|
-
-
|
|
513
|
-
-
|
|
514
|
-
- **Equipe**: Consulte [CODEOWNERS]({{repositoryWebUrl}}/-/blob/master/CODEOWNERS)
|
|
76
|
+
- [Desenvolvimento](./Desenvolvimento.md) — git workflow and {{prTermShort}} hygiene
|
|
77
|
+
- [Arquitetura](./Arquitetura.md) — how the pieces fit together
|
|
515
78
|
|
|
516
|
-
|
|
79
|
+
## Troubleshooting
|
|
517
80
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
💾 **Banco de dados**: Produção via GitLab CI/CD Schedules
|
|
522
|
-
🔄 **Sincronização**: Processo repetível para manter ambiente atualizado
|
|
523
|
-
⚡ **Toolings**: Usando comandos customizados do `.lando.yml`
|
|
81
|
+
If anything goes wrong during the first boot, check
|
|
82
|
+
[Troubleshooting](./Troubleshooting.md) — common Lando/Docker issues
|
|
83
|
+
are listed there.
|