Make generated Vue monorepos buildable with docker compose #9

Merged
FernandoJVideira merged 1 commits from fix/vue-monorepo-docker into main 2026-09-16 12:27:07 +00:00
Owner

Summary

Running draft new monorepo with the Vue client and then docker compose build client failed three separate ways, each found by actually doing it end to end:

  • No Dockerfile — the Vue overlay never shipped one. project-template#4 adds an nginx-based image; the client-vue sync job now embeds it plus nginx.conf.template, and the scaffold rewrites its pnpm pin to the local version like the Nuxt overlay does
  • Stale root lockfile — the Vue scaffold wrote a pnpm-workspace.yaml into apps/client (to approve vue-demi's build script), which made it its own workspace: the installs updated a nested lockfile while the root one kept describing the template's Nuxt client, so pnpm install --frozen-lockfile refused it. It's now only written when the client isn't already inside a workspace (standalone draft new client)
  • Missing component — the client-vue job listed components by name, so the AuthCard.vue that Login.vue/Signup.vue import was never embedded. It embeds src/components/ as a whole now

Also bumps the submodule to project-template#4 and notes both client images in the README. Merge project-template#4 first.

Test plan

  • go vet ./cmd/... ./tools/... && go build .; assets/embedded/client-vue contains Dockerfile, nginx.conf.template, src/components/AuthCard.vue
  • draft new monorepo (Vue): no nested apps/client/pnpm-workspace.yaml/lockfile; docker compose build client succeeds; container serves / and a deep link (200), /api/ reaches nginx
  • draft new monorepo (Nuxt): docker compose build client still succeeds
  • Standalone draft new client (Vue) still writes its own pnpm-workspace.yaml

🤖 Generated with Claude Code

## Summary Running `draft new monorepo` with the Vue client and then `docker compose build client` failed three separate ways, each found by actually doing it end to end: - **No Dockerfile** — the Vue overlay never shipped one. project-template#4 adds an nginx-based image; the `client-vue` sync job now embeds it plus `nginx.conf.template`, and the scaffold rewrites its pnpm pin to the local version like the Nuxt overlay does - **Stale root lockfile** — the Vue scaffold wrote a `pnpm-workspace.yaml` into `apps/client` (to approve `vue-demi`'s build script), which made it its own workspace: the installs updated a nested lockfile while the root one kept describing the template's Nuxt client, so `pnpm install --frozen-lockfile` refused it. It's now only written when the client isn't already inside a workspace (standalone `draft new client`) - **Missing component** — the `client-vue` job listed components by name, so the `AuthCard.vue` that `Login.vue`/`Signup.vue` import was never embedded. It embeds `src/components/` as a whole now Also bumps the submodule to project-template#4 and notes both client images in the README. Merge project-template#4 first. ## Test plan - [x] `go vet ./cmd/... ./tools/... && go build .`; `assets/embedded/client-vue` contains `Dockerfile`, `nginx.conf.template`, `src/components/AuthCard.vue` - [x] `draft new monorepo` (Vue): no nested `apps/client/pnpm-workspace.yaml`/lockfile; `docker compose build client` succeeds; container serves `/` and a deep link (200), `/api/` reaches nginx - [x] `draft new monorepo` (Nuxt): `docker compose build client` still succeeds - [ ] Standalone `draft new client` (Vue) still writes its own `pnpm-workspace.yaml` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
FernandoJVideira added 1 commit 2026-09-16 12:22:40 +00:00
Running `draft new monorepo` with the Vue client and then
`docker compose build client` failed three separate ways, each found by
actually doing it:

- No Dockerfile: the Vue overlay never shipped one. The template now has
  an nginx-based image (project-template#4) and the client-vue sync job
  embeds it plus its nginx.conf.template, with the pnpm pin rewritten to
  the local version like the Nuxt overlay.
- Stale root lockfile: the Vue scaffold wrote a pnpm-workspace.yaml into
  apps/client (to approve vue-demi's build script), which made it its own
  workspace, so the installs updated a nested lockfile and the root one
  kept describing the template's Nuxt client - pnpm install
  --frozen-lockfile then refused it. The file is only written when the
  client isn't already inside a workspace (standalone `draft new client`).
- Missing component: the client-vue job listed components by name, so the
  AuthCard.vue that Login/Signup import was never embedded. It now embeds
  src/components/ as a whole.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
FernandoJVideira merged commit 39678f3ea6 into main 2026-09-16 12:27:07 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: FernandoJVideira/draft#9