Skip to content

chore(docker): dev-setup polish#860

Merged
antontranelis merged 4 commits into
mainfrom
chore/dev-setup-polish
Jun 6, 2026
Merged

chore(docker): dev-setup polish#860
antontranelis merged 4 commits into
mainfrom
chore/dev-setup-polish

Conversation

@antontranelis

Copy link
Copy Markdown
Member

Summary

Three small follow-ups to #859 that smooth out the local dev experience without changing how production is run.

Commit 1 — Dockerfile casing + trailing newline

Resolves the FromAsCasing buildkit warning that's been ticking on every build, plus the missing final newline.

Commit 2 — backend/directus-sync.config.json

directus-sync printed [config] No config file found. Tried path: … on every invocation. Adding a minimal config file silences that and gives us a single place for sync defaults that aren't environment-specific.

Commit 3 — init-uploads service auto-fixes permissions

A fresh checkout (or a sudo rm -rf data/ reset) hits

EACCES: permission denied, open '/directus/uploads/directus-health-file'

because the host-side ./data/uploads is root-owned while the Directus container runs as a non-root user. Adding a one-shot busybox service that runs before the backend (service_completed_successfully gate) and chmods the directory removes the manual sudo chmod 777 -R ./data/ step from the README.

Test plan

  • Fresh checkout + docker compose up -d --build + cd backend && ./push.sh && ./seed.sh succeeds without manual chmod
  • No more [config] No config file found log from directus-sync
  • No more FromAsCasing warning from docker build

🤖 Generated with Claude Code

antontranelis and others added 3 commits June 6, 2026 23:28
Resolves the 'FromAsCasing: as and FROM keywords casing do not match'
buildkit warning and adds the missing newline at end of file.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
directus-sync looked for one of
  directus-sync.config.{js,cjs,json}
on every run and warned 'No config file found'. Pinning dumpPath in a
proper config file silences the warning and gives us a single place to
hold the few defaults that don't belong in env vars.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
A fresh checkout (or a 'sudo rm -rf data/' reset) hits an EACCES on
/directus/uploads because the bind-mounted host directory is
root-owned, while the Directus container runs as a non-root user.

Add a one-shot 'init-uploads' service that runs before the backend and
chmods ./data/uploads to 777, then make the backend depend on it via
'service_completed_successfully'. The matching 'sudo chmod 777 -R
./data/' step in the README is no longer needed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@antontranelis antontranelis changed the title chore(infra): dev-setup polish chore(docker): dev-setup polish Jun 6, 2026
- backend/README.md: bump directus-sync CLI examples to @3.5.1 to match
  the version pinned in push/pull/seed.sh.
- backend/README.md: narrow the 'Access Data on local drive' chmod hint
  to ./data/database only; ./data/uploads is now handled automatically
  by the init-uploads service.
- cypress/README.md: same adjustment in the troubleshooting section.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@antontranelis antontranelis merged commit 2076c41 into main Jun 6, 2026
26 checks passed
@antontranelis antontranelis deleted the chore/dev-setup-polish branch June 6, 2026 22:24
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.

1 participant