@lbajsarowicz/warden-skill 1.2.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/LICENSE +21 -0
- package/README.md +67 -0
- package/SKILL.md +158 -0
- package/examples/workflows.md +65 -0
- package/metadata.json +22 -0
- package/package.json +36 -0
- package/references/commands.md +73 -0
- package/references/env-variables.md +45 -0
- package/references/environments.md +43 -0
- package/references/global-services.md +35 -0
- package/references/troubleshooting.md +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Lukasz Bajsarowicz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Warden Agent Skill
|
|
2
|
+
|
|
3
|
+
Agent Skill for [Warden](https://warden.dev) – a Docker-based local development environment wrapper for PHP applications (Magento, Laravel, Symfony, WordPress, Drupal, and more).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Via skills CLI
|
|
9
|
+
npx skills add lbajsarowicz/ai-skills-warden
|
|
10
|
+
|
|
11
|
+
# Or via npm
|
|
12
|
+
npm install @lbajsarowicz/warden-skill
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## What This Skill Provides
|
|
16
|
+
|
|
17
|
+
Teaches AI agents how to:
|
|
18
|
+
|
|
19
|
+
- Initialize and manage Warden environments
|
|
20
|
+
- Import/export databases (including `pv | gzip -d | warden db import` pattern)
|
|
21
|
+
- Run shell commands, debugging (Xdebug), and profiling (Blackfire, SPX)
|
|
22
|
+
- Manage global services (Traefik, DNS, Mailpit)
|
|
23
|
+
- Troubleshoot common issues (DNS, SSL, Xdebug, sync)
|
|
24
|
+
- Map `.env` variables to services and generate configuration tables
|
|
25
|
+
|
|
26
|
+
## Quick Reference
|
|
27
|
+
|
|
28
|
+
| Task | Command |
|
|
29
|
+
|------|---------|
|
|
30
|
+
| Start environment | `warden svc up -d && warden env up -d` |
|
|
31
|
+
| Database import | `pv dump.sql.gz \| gzip -d \| warden db import` |
|
|
32
|
+
| Interactive MySQL | `warden db connect` |
|
|
33
|
+
| Shell (debugging) | `warden debug` |
|
|
34
|
+
| Shell (normal) | `warden shell` |
|
|
35
|
+
| Preview config | `warden env config` |
|
|
36
|
+
|
|
37
|
+
## Links
|
|
38
|
+
|
|
39
|
+
- [Warden Documentation](https://docs.warden.dev)
|
|
40
|
+
- [Warden GitHub](https://github.com/wardenenv/warden)
|
|
41
|
+
|
|
42
|
+
## Publishing (Maintainers)
|
|
43
|
+
|
|
44
|
+
Releases are automated via Conventional Commits. Merge a PR with `feat:` or `fix:` commits to trigger a new version and npm publish.
|
|
45
|
+
|
|
46
|
+
### One-time Setup
|
|
47
|
+
|
|
48
|
+
1. **npm access token**
|
|
49
|
+
- Create at https://www.npmjs.com/settings/lbajsarowicz/tokens
|
|
50
|
+
- Type: Automation, enable "Bypass two-factor authentication (2FA)"
|
|
51
|
+
- Add as GitHub secret: `NPM_TOKEN`
|
|
52
|
+
|
|
53
|
+
2. **GitHub PAT for release**
|
|
54
|
+
- Create a Personal Access Token (classic: `repo` scope, or fine-grained: `Contents` + `Metadata` = Read and write)
|
|
55
|
+
- Add as GitHub secret: `RELEASE_TOKEN`
|
|
56
|
+
- **Branch protection**: If `main` is protected, add the PAT owner (e.g. `lbajsarowicz`) to **Settings → Branches → main → Allow specified actors to bypass required pull requests**. Otherwise the workflow's direct push will be rejected.
|
|
57
|
+
|
|
58
|
+
### Release Flow
|
|
59
|
+
|
|
60
|
+
1. Commit with Conventional Commits: `feat(commands): add X`, `fix(troubleshooting): correct Y`
|
|
61
|
+
2. Open PR and merge to `main`
|
|
62
|
+
3. CI calculates version, pushes version bump to `main`, creates tag (e.g. `v1.1.0`)
|
|
63
|
+
4. Release workflow publishes to npm and creates GitHub Release
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
MIT
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: warden-dev
|
|
3
|
+
description: Manage Docker-based local development environments with Warden. Use when setting up PHP/Node projects (Magento, Laravel, Symfony, WordPress, Drupal), importing databases, running shell commands, debugging with Xdebug, or managing Docker services. Triggers on "warden", "local environment", "docker-compose wrapper", "database import", "shell access".
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: lbajsarowicz
|
|
7
|
+
version: '1.0.0'
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Warden Agent Skill
|
|
11
|
+
|
|
12
|
+
Warden is a local wrapper for docker-compose that automates DNS (dnsmasq), reverse proxy (Traefik), and webmail (Mailpit). Project `.env` drives ephemeral `docker-compose.yml` generation. Preview with `warden env config`.
|
|
13
|
+
|
|
14
|
+
## Quick Start
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
warden env-init myproject magento2 # Initialize project
|
|
18
|
+
warden svc up -d # Start global services (Traefik, DNS, Mailpit)
|
|
19
|
+
warden env up -d # Start project containers
|
|
20
|
+
warden shell # Interactive shell in php-fpm
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Environment Lifecycle
|
|
24
|
+
|
|
25
|
+
| Command | Purpose | Example |
|
|
26
|
+
|---------|---------|---------|
|
|
27
|
+
| `warden env-init` | Initialize new project | `warden env-init mystore magento2` |
|
|
28
|
+
| `warden env up` | Start environment | `warden env up -d` |
|
|
29
|
+
| `warden env down` | Stop environment | `warden env down` |
|
|
30
|
+
| `warden env config` | Preview docker-compose | `warden env config` |
|
|
31
|
+
| `warden env ps` | List containers | `warden env ps` |
|
|
32
|
+
| `warden env pull` | Pull images | `warden env pull` |
|
|
33
|
+
| `warden env logs -f nginx` | Follow logs | `warden env logs -f nginx` |
|
|
34
|
+
| `warden env exec php-fpm bash` | Exec into container | `warden env exec php-fpm bash` |
|
|
35
|
+
|
|
36
|
+
## Database Operations
|
|
37
|
+
|
|
38
|
+
| Command | Purpose | Example |
|
|
39
|
+
|---------|---------|---------|
|
|
40
|
+
| `warden db connect` | Interactive MySQL | `warden db connect` |
|
|
41
|
+
| `warden db import` | Import SQL dump | See patterns below |
|
|
42
|
+
| `warden db dump` | Export database | `warden db dump > backup.sql` |
|
|
43
|
+
| `warden db upgrade` | Upgrade MariaDB/MySQL | `warden db upgrade` |
|
|
44
|
+
|
|
45
|
+
**Import patterns (preferred for large dumps):**
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pv dump.sql.gz | gzip -d | warden db import
|
|
49
|
+
gzip -dc dump.sql.gz | warden db import
|
|
50
|
+
warden db import < database.sql
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Shell Access
|
|
54
|
+
|
|
55
|
+
| Command | Purpose |
|
|
56
|
+
|---------|---------|
|
|
57
|
+
| `warden shell` | PHP-FPM container shell (default: bash) |
|
|
58
|
+
| `warden debug` | Xdebug-enabled shell (use for debugging) |
|
|
59
|
+
| `warden blackfire` | Blackfire profiler: `warden blackfire run php script.php` |
|
|
60
|
+
| `warden spx` | PHP SPX profiler |
|
|
61
|
+
|
|
62
|
+
**Important:** Use `warden debug` (not `warden shell`) when debugging with Xdebug.
|
|
63
|
+
|
|
64
|
+
## Service Management
|
|
65
|
+
|
|
66
|
+
| Command | Purpose |
|
|
67
|
+
|---------|---------|
|
|
68
|
+
| `warden svc up -d` | Start global services |
|
|
69
|
+
| `warden svc down` | Stop global services |
|
|
70
|
+
| `warden svc ps` | List global services |
|
|
71
|
+
| `warden status` | List running environments |
|
|
72
|
+
|
|
73
|
+
## File Sync (macOS)
|
|
74
|
+
|
|
75
|
+
| Command | Purpose |
|
|
76
|
+
|---------|---------|
|
|
77
|
+
| `warden sync start` | Start Mutagen sync |
|
|
78
|
+
| `warden sync monitor` | Monitor sync status |
|
|
79
|
+
| `warden sync flush` | Flush sync |
|
|
80
|
+
| `warden sync reset` | Reset sync |
|
|
81
|
+
|
|
82
|
+
## Redis / Valkey
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
warden redis # Interactive Redis CLI
|
|
86
|
+
warden redis FLUSHALL # Execute command
|
|
87
|
+
warden valkey # Valkey (Redis alternative)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Environment Types
|
|
91
|
+
|
|
92
|
+
Supported: `magento2`, `magento1`, `laravel`, `symfony`, `wordpress`, `drupal`, `shopware`, `cakephp`, `local`. See `references/environments.md`.
|
|
93
|
+
|
|
94
|
+
## Key .env Variables
|
|
95
|
+
|
|
96
|
+
Project `.env` controls services and versions. See `references/env-variables.md` for full reference.
|
|
97
|
+
|
|
98
|
+
| Variable | Description |
|
|
99
|
+
|----------|-------------|
|
|
100
|
+
| `WARDEN_ENV_NAME` | Unique project identifier |
|
|
101
|
+
| `WARDEN_ENV_TYPE` | Environment type |
|
|
102
|
+
| `TRAEFIK_DOMAIN` | Base domain (default: `{name}.test`) |
|
|
103
|
+
| `PHP_VERSION` | PHP version (7.4, 8.1–8.4) |
|
|
104
|
+
| `WARDEN_DB`, `WARDEN_REDIS`, etc. | Service toggles (1/0) |
|
|
105
|
+
| `MYSQL_DISTRIBUTION_VERSION` | MariaDB/MySQL version |
|
|
106
|
+
|
|
107
|
+
## Service Name Mapping
|
|
108
|
+
|
|
109
|
+
| .env Variable | Container Name(s) |
|
|
110
|
+
|---------------|-------------------|
|
|
111
|
+
| `WARDEN_DB=1` | `db` |
|
|
112
|
+
| `WARDEN_REDIS=1` | `redis` |
|
|
113
|
+
| `WARDEN_OPENSEARCH=1` | `opensearch` |
|
|
114
|
+
| `WARDEN_ELASTICSEARCH=1` | `elasticsearch` |
|
|
115
|
+
| `WARDEN_VARNISH=1` | `varnish` |
|
|
116
|
+
| `WARDEN_RABBITMQ=1` | `rabbitmq` |
|
|
117
|
+
| `WARDEN_NGINX=1` | `nginx` |
|
|
118
|
+
| `PHP_VERSION` | `php-fpm`, `php-debug` |
|
|
119
|
+
|
|
120
|
+
## Global Services & URLs
|
|
121
|
+
|
|
122
|
+
Default domain: `warden.test`. Configure in `~/.warden/.env` (`WARDEN_SERVICE_DOMAIN`).
|
|
123
|
+
|
|
124
|
+
| Service | URL |
|
|
125
|
+
|---------|-----|
|
|
126
|
+
| Traefik Dashboard | `https://traefik.warden.test` |
|
|
127
|
+
| Webmail (Mailpit) | `https://webmail.warden.test` |
|
|
128
|
+
| Portainer | `https://portainer.warden.test` |
|
|
129
|
+
| phpMyAdmin | `https://phpmyadmin.warden.test` |
|
|
130
|
+
|
|
131
|
+
**Email (Mailpit):** No SMTP config needed. Warden routes sendmail to Mailpit. All emails at `https://webmail.warden.test`.
|
|
132
|
+
|
|
133
|
+
## Framework Compatibility
|
|
134
|
+
|
|
135
|
+
For "match Magento 2.4.8 requirements" requests:
|
|
136
|
+
|
|
137
|
+
1. Search official docs for system requirements
|
|
138
|
+
2. Map to `.env`: PHP → `PHP_VERSION`, DB → `MYSQL_DISTRIBUTION_VERSION`, etc.
|
|
139
|
+
3. Update `.env` with matched versions
|
|
140
|
+
|
|
141
|
+
## Agent Behavior Examples
|
|
142
|
+
|
|
143
|
+
**Generate service table:** Read `.env`, map `WARDEN_*` variables to service status, output table (Service | Status | Version).
|
|
144
|
+
|
|
145
|
+
**Verify PHP running:** Run `warden env ps`, check for `php-fpm`, `php-debug`, `php-blackfire`.
|
|
146
|
+
|
|
147
|
+
**Troubleshoot non-loading site:** `warden svc ps` → `warden env ps` → `ping app.{project}.test` → `warden env logs nginx`.
|
|
148
|
+
|
|
149
|
+
**Xdebug not working:** Use `warden debug`, verify IDE server name `{project}-docker`, port 9003, XDEBUG_SESSION cookie.
|
|
150
|
+
|
|
151
|
+
## References
|
|
152
|
+
|
|
153
|
+
- `references/commands.md` – Full command reference
|
|
154
|
+
- `references/environments.md` – Environment types
|
|
155
|
+
- `references/env-variables.md` – .env variable reference
|
|
156
|
+
- `references/global-services.md` – Service URLs and config
|
|
157
|
+
- `references/troubleshooting.md` – Common issues and solutions
|
|
158
|
+
- `examples/workflows.md` – Workflow examples
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Common Workflows
|
|
2
|
+
|
|
3
|
+
## New Magento 2 Project Setup
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
warden env-init mystore magento2
|
|
7
|
+
# Edit .env to customize versions if needed
|
|
8
|
+
warden svc up -d
|
|
9
|
+
warden env up -d
|
|
10
|
+
warden shell
|
|
11
|
+
# Inside: composer install, bin/magento setup:install, etc.
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Database Import from Production
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# With progress (recommended for large dumps)
|
|
18
|
+
pv production.sql.gz | gzip -d | warden db import
|
|
19
|
+
|
|
20
|
+
# Without pv
|
|
21
|
+
gzip -dc production.sql.gz | warden db import
|
|
22
|
+
|
|
23
|
+
# Plain SQL
|
|
24
|
+
warden db import < database.sql
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Debugging with Xdebug
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
warden debug
|
|
31
|
+
# Inside container, Xdebug is preconfigured
|
|
32
|
+
php bin/magento cache:flush
|
|
33
|
+
# Set breakpoint in IDE, trigger from browser with XDEBUG_SESSION cookie
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Update Service Versions for Framework
|
|
37
|
+
|
|
38
|
+
1. Search official docs for framework system requirements (e.g. Magento 2.4.8-p2)
|
|
39
|
+
2. Read project `.env`
|
|
40
|
+
3. Update `PHP_VERSION`, `MYSQL_DISTRIBUTION_VERSION`, `OPENSEARCH_VERSION`, etc.
|
|
41
|
+
4. Run `warden env pull && warden env up -d --force-recreate`
|
|
42
|
+
|
|
43
|
+
## Verify Service Status
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
warden env ps
|
|
47
|
+
# Check for php-fpm, php-debug, db, nginx, etc.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Generate Service Configuration Table
|
|
51
|
+
|
|
52
|
+
1. Read `.env`
|
|
53
|
+
2. Map `WARDEN_*` variables to service status (1=enabled, 0=disabled)
|
|
54
|
+
3. Map version variables (PHP_VERSION, MYSQL_DISTRIBUTION_VERSION, etc.)
|
|
55
|
+
4. Output table: Service | Status | Version
|
|
56
|
+
|
|
57
|
+
## Troubleshoot Non-Loading Site
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
warden svc ps # Global services running?
|
|
61
|
+
warden env ps # Project containers running?
|
|
62
|
+
ping app.myproject.test # DNS resolving?
|
|
63
|
+
warden env logs nginx # Check nginx logs
|
|
64
|
+
warden doctor -v # Full diagnostic
|
|
65
|
+
```
|
package/metadata.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.2.0",
|
|
3
|
+
"organization": "warden.dev",
|
|
4
|
+
"date": "February 2026",
|
|
5
|
+
"abstract": "Manage Docker-based local development environments for PHP applications including Magento, Laravel, Symfony, WordPress, and Drupal. Wraps docker-compose with intelligent defaults and service orchestration.",
|
|
6
|
+
"references": [
|
|
7
|
+
"https://warden.dev",
|
|
8
|
+
"https://docs.warden.dev",
|
|
9
|
+
"https://github.com/wardenenv/warden"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"docker",
|
|
13
|
+
"docker-compose",
|
|
14
|
+
"local-development",
|
|
15
|
+
"magento",
|
|
16
|
+
"laravel",
|
|
17
|
+
"symfony",
|
|
18
|
+
"wordpress",
|
|
19
|
+
"php",
|
|
20
|
+
"devops"
|
|
21
|
+
]
|
|
22
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lbajsarowicz/warden-skill",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Agent Skill for Warden Docker development environments",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"warden",
|
|
7
|
+
"docker",
|
|
8
|
+
"magento",
|
|
9
|
+
"laravel",
|
|
10
|
+
"php",
|
|
11
|
+
"agent-skill",
|
|
12
|
+
"cursor",
|
|
13
|
+
"ai"
|
|
14
|
+
],
|
|
15
|
+
"author": "Lukasz Bajsarowicz",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/lbajsarowicz/ai-skills-warden.git"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"SKILL.md",
|
|
23
|
+
"metadata.json",
|
|
24
|
+
"references/",
|
|
25
|
+
"examples/",
|
|
26
|
+
"README.md",
|
|
27
|
+
"LICENSE"
|
|
28
|
+
],
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@commitlint/cli": "^19.0.0",
|
|
34
|
+
"@commitlint/config-conventional": "^19.0.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Warden Command Reference
|
|
2
|
+
|
|
3
|
+
## Environment Lifecycle
|
|
4
|
+
|
|
5
|
+
| Command | Description |
|
|
6
|
+
|---------|-------------|
|
|
7
|
+
| `warden env-init <name> <type>` | Initialize new project. Types: magento2, magento1, laravel, symfony, wordpress, drupal, shopware, cakephp, local |
|
|
8
|
+
| `warden env up [-d]` | Start project containers. Use `-d` for detached mode |
|
|
9
|
+
| `warden env down` | Stop and remove project containers |
|
|
10
|
+
| `warden env start` | Start stopped containers |
|
|
11
|
+
| `warden env stop` | Stop containers without removing |
|
|
12
|
+
| `warden env restart [service]` | Restart all or specific service |
|
|
13
|
+
| `warden env ps` | List containers and status |
|
|
14
|
+
| `warden env config` | Preview generated docker-compose.yml |
|
|
15
|
+
| `warden env pull` | Pull latest Docker images |
|
|
16
|
+
| `warden env logs [-f] [service]` | View logs. Use `-f` to follow |
|
|
17
|
+
| `warden env exec <service> <cmd>` | Execute command in container |
|
|
18
|
+
|
|
19
|
+
## Database
|
|
20
|
+
|
|
21
|
+
| Command | Description |
|
|
22
|
+
|---------|-------------|
|
|
23
|
+
| `warden db connect` | Interactive MySQL session |
|
|
24
|
+
| `warden db import` | Import from stdin. Use `pv file.sql.gz \| gzip -d \| warden db import` for large dumps |
|
|
25
|
+
| `warden db dump` | Export via mysqldump. Redirect to file: `warden db dump > backup.sql` |
|
|
26
|
+
| `warden db upgrade` | Run MariaDB/MySQL upgrade after version change |
|
|
27
|
+
|
|
28
|
+
## Shell Access
|
|
29
|
+
|
|
30
|
+
| Command | Description |
|
|
31
|
+
|---------|-------------|
|
|
32
|
+
| `warden shell` | Bash in php-fpm container |
|
|
33
|
+
| `warden debug` | Bash with Xdebug enabled (use for debugging) |
|
|
34
|
+
| `warden blackfire run <cmd>` | Run command with Blackfire profiler |
|
|
35
|
+
| `warden spx` | PHP SPX profiler |
|
|
36
|
+
|
|
37
|
+
## Global Services (svc)
|
|
38
|
+
|
|
39
|
+
| Command | Description |
|
|
40
|
+
|---------|-------------|
|
|
41
|
+
| `warden svc up [-d]` | Start Traefik, DNSMasq, Mailpit |
|
|
42
|
+
| `warden svc down` | Stop global services |
|
|
43
|
+
| `warden svc ps` | List global service status |
|
|
44
|
+
| `warden svc logs [service]` | View global service logs |
|
|
45
|
+
|
|
46
|
+
## Sync (Mutagen, macOS)
|
|
47
|
+
|
|
48
|
+
| Command | Description |
|
|
49
|
+
|---------|-------------|
|
|
50
|
+
| `warden sync start` | Start file sync |
|
|
51
|
+
| `warden sync stop` | Stop sync |
|
|
52
|
+
| `warden sync list [-l]` | List sync status |
|
|
53
|
+
| `warden sync monitor` | Continuous status display |
|
|
54
|
+
| `warden sync flush` | Force sync cycle |
|
|
55
|
+
| `warden sync pause` | Pause sync |
|
|
56
|
+
| `warden sync resume` | Resume sync |
|
|
57
|
+
| `warden sync reset` | Reset sync session |
|
|
58
|
+
|
|
59
|
+
## Redis / Valkey
|
|
60
|
+
|
|
61
|
+
| Command | Description |
|
|
62
|
+
|---------|-------------|
|
|
63
|
+
| `warden redis [cmd]` | Redis CLI. Pass command or interactive |
|
|
64
|
+
| `warden valkey [cmd]` | Valkey CLI (Redis alternative) |
|
|
65
|
+
|
|
66
|
+
## Other
|
|
67
|
+
|
|
68
|
+
| Command | Description |
|
|
69
|
+
|---------|-------------|
|
|
70
|
+
| `warden status` | List running environments |
|
|
71
|
+
| `warden doctor [-v]` | Diagnose Warden setup. `-v` for verbose |
|
|
72
|
+
| `warden sign-certificate <domain>` | Sign SSL certificate for domain |
|
|
73
|
+
| `warden vnc` | VNC access (when enabled) |
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# .env Variable Reference
|
|
2
|
+
|
|
3
|
+
## Common Variables (All Environments)
|
|
4
|
+
|
|
5
|
+
| Variable | Default | Description |
|
|
6
|
+
|----------|---------|-------------|
|
|
7
|
+
| `WARDEN_ENV_NAME` | (required) | Unique project identifier |
|
|
8
|
+
| `WARDEN_ENV_TYPE` | (required) | magento2, laravel, symfony, etc. |
|
|
9
|
+
| `TRAEFIK_DOMAIN` | `{WARDEN_ENV_NAME}.test` | Base domain |
|
|
10
|
+
| `TRAEFIK_SUBDOMAIN` | `app` | Subdomain prefix |
|
|
11
|
+
| `WARDEN_WEB_ROOT` | `/` | Web root path |
|
|
12
|
+
| `PHP_VERSION` | varies by type | 7.4, 8.1, 8.2, 8.3, 8.4 |
|
|
13
|
+
| `PHP_XDEBUG_3` | `1` | Use Xdebug 3 |
|
|
14
|
+
| `NODE_VERSION` | varies | Node.js version |
|
|
15
|
+
| `COMPOSER_VERSION` | `2` | Composer version |
|
|
16
|
+
| `MYSQL_DISTRIBUTION` | `mariadb` | mariadb or mysql |
|
|
17
|
+
| `MYSQL_DISTRIBUTION_VERSION` | varies | Database version |
|
|
18
|
+
|
|
19
|
+
## Service Toggles
|
|
20
|
+
|
|
21
|
+
| Variable | Default (Magento2) | Container |
|
|
22
|
+
|----------|--------------------|-----------|
|
|
23
|
+
| `WARDEN_DB` | 1 | db |
|
|
24
|
+
| `WARDEN_REDIS` | 1 | redis |
|
|
25
|
+
| `WARDEN_VALKEY` | 0 | valkey |
|
|
26
|
+
| `WARDEN_ELASTICSEARCH` | 0 | elasticsearch |
|
|
27
|
+
| `WARDEN_OPENSEARCH` | 1 | opensearch |
|
|
28
|
+
| `WARDEN_VARNISH` | 1 | varnish |
|
|
29
|
+
| `WARDEN_RABBITMQ` | 1 | rabbitmq |
|
|
30
|
+
| `WARDEN_NGINX` | 1 | nginx |
|
|
31
|
+
| `WARDEN_BLACKFIRE` | 0 | php-blackfire |
|
|
32
|
+
| `WARDEN_PHP_SPX` | 0 | php-spx |
|
|
33
|
+
| `WARDEN_SELENIUM` | 0 | selenium |
|
|
34
|
+
|
|
35
|
+
## Magento 2 Version Defaults
|
|
36
|
+
|
|
37
|
+
| Variable | Default |
|
|
38
|
+
|----------|---------|
|
|
39
|
+
| `PHP_VERSION` | 8.4 |
|
|
40
|
+
| `MYSQL_DISTRIBUTION_VERSION` | 11.4 |
|
|
41
|
+
| `REDIS_VERSION` | 7.2 |
|
|
42
|
+
| `VARNISH_VERSION` | 7.7 |
|
|
43
|
+
| `RABBITMQ_VERSION` | 4.1 |
|
|
44
|
+
| `OPENSEARCH_VERSION` | 3.3 |
|
|
45
|
+
| `NODE_VERSION` | 20 |
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Warden Environment Types
|
|
2
|
+
|
|
3
|
+
## Supported Types
|
|
4
|
+
|
|
5
|
+
| Type | Services | Use Case |
|
|
6
|
+
|------|----------|----------|
|
|
7
|
+
| `magento2` | Nginx, Varnish, PHP-FPM, MariaDB, OpenSearch, Redis, RabbitMQ | Adobe Commerce / Magento 2 |
|
|
8
|
+
| `magento1` | Nginx, PHP-FPM, MariaDB, Redis | Magento 1.x |
|
|
9
|
+
| `laravel` | Nginx, PHP-FPM, MariaDB, Redis | Laravel apps |
|
|
10
|
+
| `symfony` | Nginx, PHP-FPM, MariaDB, Redis | Symfony 4+ |
|
|
11
|
+
| `wordpress` | Nginx, PHP-FPM, MariaDB | WordPress sites |
|
|
12
|
+
| `drupal` | Nginx, PHP-FPM, MariaDB | Drupal CMS |
|
|
13
|
+
| `shopware` | Nginx, PHP-FPM, MariaDB, Redis | Shopware 6 |
|
|
14
|
+
| `cakephp` | Nginx, PHP-FPM, MariaDB | CakePHP |
|
|
15
|
+
| `local` | User-defined | Custom Docker setup |
|
|
16
|
+
|
|
17
|
+
## Initialization
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
warden env-init <project-name> <type>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Example: `warden env-init mystore magento2`
|
|
24
|
+
|
|
25
|
+
## Default Services by Type
|
|
26
|
+
|
|
27
|
+
- **Magento 2**: DB, Redis, Varnish, RabbitMQ, OpenSearch (or Elasticsearch)
|
|
28
|
+
- **Magento 1**: DB, Redis
|
|
29
|
+
- **Laravel/Symfony/Shopware**: DB, Redis
|
|
30
|
+
- **WordPress/Drupal/CakePHP**: DB
|
|
31
|
+
|
|
32
|
+
## Optional Services
|
|
33
|
+
|
|
34
|
+
Toggle in `.env` with `WARDEN_*=1` or `0`:
|
|
35
|
+
|
|
36
|
+
- `WARDEN_ELASTICSEARCH`
|
|
37
|
+
- `WARDEN_OPENSEARCH`
|
|
38
|
+
- `WARDEN_VARNISH`
|
|
39
|
+
- `WARDEN_RABBITMQ`
|
|
40
|
+
- `WARDEN_BLACKFIRE`
|
|
41
|
+
- `WARDEN_PHP_SPX`
|
|
42
|
+
- `WARDEN_SELENIUM`
|
|
43
|
+
- `WARDEN_VALKEY`
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Global Services & URLs
|
|
2
|
+
|
|
3
|
+
## Service URLs (default domain: warden.test)
|
|
4
|
+
|
|
5
|
+
| Service | URL |
|
|
6
|
+
|---------|-----|
|
|
7
|
+
| Traefik Dashboard | https://traefik.warden.test |
|
|
8
|
+
| Webmail (Mailpit) | https://webmail.warden.test |
|
|
9
|
+
| Portainer | https://portainer.warden.test |
|
|
10
|
+
| phpMyAdmin | https://phpmyadmin.warden.test |
|
|
11
|
+
|
|
12
|
+
Per-project: RabbitMQ, Elasticsearch, OpenSearch at `https://{service}.{project}.test`
|
|
13
|
+
|
|
14
|
+
## Global Configuration (~/.warden/.env)
|
|
15
|
+
|
|
16
|
+
| Variable | Default | Description |
|
|
17
|
+
|----------|---------|-------------|
|
|
18
|
+
| `WARDEN_SERVICE_DOMAIN` | warden.test | Base domain for global services |
|
|
19
|
+
| `WARDEN_DNSMASQ_ENABLE` | 1 | Enable DNS for .test domains |
|
|
20
|
+
| `WARDEN_PORTAINER_ENABLE` | 0 | Enable Portainer UI |
|
|
21
|
+
| `WARDEN_PHPMYADMIN_ENABLE` | 1 | Enable phpMyAdmin |
|
|
22
|
+
| `WARDEN_MUTAGEN_ENABLE` | 1 (macOS) / 0 (Linux) | Mutagen file sync |
|
|
23
|
+
|
|
24
|
+
## Changing the Global Domain
|
|
25
|
+
|
|
26
|
+
1. Edit `~/.warden/.env`
|
|
27
|
+
2. Set `WARDEN_SERVICE_DOMAIN=your-domain.local`
|
|
28
|
+
3. Restart: `warden svc down && warden svc up -d`
|
|
29
|
+
4. Update DNS resolver if needed (e.g. `/etc/resolver/local` on macOS)
|
|
30
|
+
|
|
31
|
+
## Email (Mailpit)
|
|
32
|
+
|
|
33
|
+
No SMTP configuration needed. Warden configures sendmail to route to Mailpit. All emails appear at https://webmail.warden.test.
|
|
34
|
+
|
|
35
|
+
For Magento: default sendmail transport works. No SMTP module required.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
## DNS Resolution
|
|
4
|
+
|
|
5
|
+
| Problem | Platform | Solution |
|
|
6
|
+
|---------|----------|----------|
|
|
7
|
+
| Port 53 in use | macOS | Disable Internet Sharing, or `sudo brew services stop dnsmasq` |
|
|
8
|
+
| ERR_NAME_NOT_RESOLVED | All | Verify `warden svc up -d` is running |
|
|
9
|
+
| DNS not working | Linux | Add entries to `/etc/hosts` or configure systemd-resolved |
|
|
10
|
+
| DNS not working | Windows/WSL2 | Add 127.0.0.1 as first DNS server |
|
|
11
|
+
|
|
12
|
+
## SSL Certificates
|
|
13
|
+
|
|
14
|
+
| Problem | Solution |
|
|
15
|
+
|---------|----------|
|
|
16
|
+
| "Your connection is not private" | Import `~/.warden/ssl/rootca/certs/ca.cert.pem` to browser |
|
|
17
|
+
| Firefox doesn't trust cert | Preferences > Privacy > View Certificates > Import CA |
|
|
18
|
+
| Certificate generation fails | Run `warden install` to regenerate CA |
|
|
19
|
+
|
|
20
|
+
## Xdebug
|
|
21
|
+
|
|
22
|
+
| Problem | Solution |
|
|
23
|
+
|---------|----------|
|
|
24
|
+
| Could not connect to debugging client | Check firewall allows port 9003 |
|
|
25
|
+
| Xdebug not triggering | Use `warden debug` (not `warden shell`), set XDEBUG_SESSION cookie |
|
|
26
|
+
| Wrong host connection | Verify IDE server name: `{WARDEN_ENV_NAME}-docker` |
|
|
27
|
+
|
|
28
|
+
## Elasticsearch/OpenSearch (Apple Silicon)
|
|
29
|
+
|
|
30
|
+
| Problem | Solution |
|
|
31
|
+
|---------|----------|
|
|
32
|
+
| Container crashes (SIGILL) | Use ARM-compatible version (OpenSearch 2.19+) |
|
|
33
|
+
| Java VM crash | Increase Docker memory to 6GB+ |
|
|
34
|
+
|
|
35
|
+
## Mutagen Sync (macOS)
|
|
36
|
+
|
|
37
|
+
| Problem | Solution |
|
|
38
|
+
|---------|----------|
|
|
39
|
+
| Files not syncing | `warden sync flush` or `warden sync reset` |
|
|
40
|
+
| Sync stuck on stop | Kill mutagen process, restart environment |
|
|
41
|
+
| Linux + MUTAGEN_ENABLE=1 | Remove from `~/.warden/.env` (not needed on Linux) |
|
|
42
|
+
|
|
43
|
+
## Database
|
|
44
|
+
|
|
45
|
+
| Problem | Solution |
|
|
46
|
+
|---------|----------|
|
|
47
|
+
| DB container not starting | Check logs: `warden env logs db` |
|
|
48
|
+
| Connection refused | Verify `warden env ps` shows db running |
|
|
49
|
+
|
|
50
|
+
## Email
|
|
51
|
+
|
|
52
|
+
| Problem | Solution |
|
|
53
|
+
|---------|----------|
|
|
54
|
+
| Emails not in Mailpit | Check `warden svc logs mailpit`, verify sendmail_path |
|
|
55
|
+
| mhsendmail errors (PHP 8.4) | Update to latest Warden images |
|
|
56
|
+
|
|
57
|
+
## General Diagnostics
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
warden doctor -v # Full diagnostic
|
|
61
|
+
warden svc ps # Global services
|
|
62
|
+
warden env ps # Project containers
|
|
63
|
+
warden env logs -f # Follow all logs
|
|
64
|
+
```
|