Skip to content

Add host-path alias symlink startup hook and validation coverage#20

Closed
UltraBob wants to merge 6 commits intomainfrom
feature/task-0052
Closed

Add host-path alias symlink startup hook and validation coverage#20
UltraBob wants to merge 6 commits intomainfrom
feature/task-0052

Conversation

@UltraBob
Copy link
Owner

@UltraBob UltraBob commented Mar 4, 2026

Summary

Implements host-path alias parity via a startup symlink strategy instead of a bind-mount alias.

What changed

  • Added .ddev/web-entrypoint.d/90-dcq-host-path-alias.sh.
  • Hook now creates a host-path alias symlink to /var/www/html at container startup.
  • Added opt-out via DCQ_HOST_PATH_ALIAS=0|false|off.
  • Added cleanup behavior for add-on-managed aliases when disabled.
  • Wired new entrypoint hook into install.yaml project_files and removal_actions.
  • Documented behavior and env var in README.md.
  • Added bats coverage for:
    • existing path-map behavior,
    • alias creation behavior,
    • alias-disable behavior.

Important fix included

Entry-point scripts are sourced by DDEV. The initial implementation used exit, which could terminate container startup when aliasing was disabled. This PR fixes that by using safe sourced-script return behavior.

Validation

Targeted bats checks pass:

  • path map prefers DDEV_HOST_PROJECT_ROOT
  • host-path alias symlink is created on restart
  • host-path alias can be disabled via DCQ_HOST_PATH_ALIAS

Notes

This PR establishes the alias architecture and keeps existing path-mapping wrappers in place for safety.
A follow-up phase will investigate removing/simplifying wrapper path-mapping logic to rely on host-path parity directly.

Refs #19

@UltraBob
Copy link
Owner Author

UltraBob commented Mar 4, 2026

Superseded by PR #21 to avoid backlog-specific branch naming. Please review #21.

@UltraBob UltraBob closed this Mar 4, 2026
@UltraBob UltraBob deleted the feature/task-0052 branch March 4, 2026 07:27
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