Skip to content

Commit 84a1525

Browse files
committed
Changed public app dev defaults
no ref Default local dev should stay lightweight while keeping orchestration in Nx. This adds an explicit public-app dev target for the expensive UMD watchers and keeps optional services on the existing compose-file scripts.
1 parent 99b1411 commit 84a1525

3 files changed

Lines changed: 41 additions & 7 deletions

File tree

AGENTS.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,24 @@ The `pnpm dev` command uses a **hybrid Docker + host development** setup:
117117
- MySQL, Redis, Mailpit
118118
- Caddy gateway/reverse proxy
119119

120-
**What runs on host:**
121-
- Frontend dev servers (Admin, Portal, Comments UI, etc.) in watch mode with HMR
122-
- Foundation libraries (shade, admin-x-framework, etc.)
120+
**What runs on host by default:**
121+
- Admin, legacy Ember admin, Portal, and foundation library dev watchers
122+
- Optional public UMD app watchers can be added when needed
123123

124124
**Setup:**
125125
```bash
126-
# Start everything (Docker + frontend dev servers)
126+
# Start the default Docker backend + host frontend watchers
127127
pnpm dev
128128

129+
# Add optional public app watchers
130+
pnpm dev:public
131+
129132
# With optional services (uses Docker Compose file composition)
130133
pnpm dev:analytics # Include Tinybird analytics
131134
pnpm dev:storage # Include MinIO S3-compatible object storage
132-
pnpm dev:all # Include all optional services
135+
pnpm dev:services # Include all optional services
136+
pnpm dev:full # Include all optional services and public app watchers
137+
pnpm dev:all # Backwards-compatible alias for all optional services
133138
```
134139

135140
**Accessing Services:**

docker/ghost-dev/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ This lightweight image:
2828
This image is used automatically when running:
2929

3030
```bash
31-
pnpm dev # Starts Docker backend + frontend dev servers on host
31+
pnpm dev # Starts Docker backend + Admin/Ember/shared/Portal dev watchers
32+
pnpm dev:public # Include all optional public UMD app watchers
3233
pnpm dev:analytics # Include Tinybird analytics
3334
pnpm dev:storage # Include MinIO S3-compatible object storage
34-
pnpm dev:all # Include all optional services
35+
pnpm dev:services # Include all optional services
36+
pnpm dev:full # Include all optional services and public app watchers
37+
pnpm dev:all # Backwards-compatible alias for all optional services
3538
```

package.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
"dev:sqlite": "DEV_COMPOSE_FILES='-f compose.dev.sqlite.yaml' pnpm nx run ghost-monorepo:docker:dev",
3737
"dev:mailgun": "DEV_COMPOSE_FILES='-f compose.dev.mailgun.yaml' pnpm nx run ghost-monorepo:docker:dev",
3838
"dev:lexical": "EDITOR_URL=http://localhost:2368/ghost/assets/koenig-lexical/ pnpm dev",
39+
"dev:public": "pnpm nx run ghost-monorepo:docker:dev:public",
40+
"dev:services": "DEV_COMPOSE_FILES='-f compose.dev.analytics.yaml -f compose.dev.storage.yaml' ./docker/stripe/with-stripe.sh pnpm nx run ghost-monorepo:docker:dev",
41+
"dev:full": "DEV_COMPOSE_FILES='-f compose.dev.analytics.yaml -f compose.dev.storage.yaml' ./docker/stripe/with-stripe.sh pnpm nx run ghost-monorepo:docker:dev:public",
3942
"dev:analytics": "DEV_COMPOSE_FILES='-f compose.dev.analytics.yaml' pnpm nx run ghost-monorepo:docker:dev",
4043
"dev:storage": "DEV_COMPOSE_FILES='-f compose.dev.storage.yaml' pnpm nx run ghost-monorepo:docker:dev",
4144
"dev:stripe": "./docker/stripe/with-stripe.sh pnpm nx run ghost-monorepo:docker:dev",
@@ -128,6 +131,29 @@
128131
}
129132
},
130133
"docker:dev": {
134+
"continuous": true,
135+
"executor": "nx:run-commands",
136+
"options": {
137+
"command": "trap 'docker compose -f compose.dev.yaml ${DEV_COMPOSE_FILES} down' EXIT; docker compose -f compose.dev.yaml ${DEV_COMPOSE_FILES} logs -f"
138+
},
139+
"dependsOn": [
140+
"docker:up",
141+
{
142+
"target": "build:assets",
143+
"projects": [
144+
"ghost"
145+
]
146+
},
147+
{
148+
"target": "dev",
149+
"projects": [
150+
"@tryghost/admin",
151+
"@tryghost/portal"
152+
]
153+
}
154+
]
155+
},
156+
"docker:dev:public": {
131157
"continuous": true,
132158
"executor": "nx:run-commands",
133159
"options": {

0 commit comments

Comments
 (0)