Skip to content

fix(dev-stack): run web containers as local user#1422

Merged
CT-Theo-Carr merged 2 commits into
mainfrom
fix/dev-stack-user-env
May 14, 2026
Merged

fix(dev-stack): run web containers as local user#1422
CT-Theo-Carr merged 2 commits into
mainfrom
fix/dev-stack-user-env

Conversation

@CT-Theo-Carr
Copy link
Copy Markdown
Contributor

Summary

  • Run dev-stack web containers as the local developer UID/GID from .dev/dev.env
  • Add a web-permissions init service to prepare shared web volumes and .next for that UID/GID
  • Move Corepack state into a writable named volume for non-root web containers

Root Cause

The Docker dev stack used the default root user from node:24-bookworm-slim, so bind-mounted Next/Turbopack cache files under apps/web/.next were generated as root:root on developer machines.

Validation

  • bash deploy/scripts/test-dev-stack.sh
  • docker compose --project-name ct-ops-dev-user-test --env-file .dev/dev.env -f docker-compose.dev-stack.yml config
  • One-off web-dev runtime check confirmed the container ran as the generated UID/GID and could write .next, node_modules, pnpm store, and Corepack cache paths.

@CT-Theo-Carr CT-Theo-Carr merged commit ed83e98 into main May 14, 2026
20 checks passed
@CT-Theo-Carr CT-Theo-Carr deleted the fix/dev-stack-user-env branch May 14, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants