fix(edge): bare migration must materialize vhost symlinks before container startup
Summary
On a Linux self-hosted instance running in bare mode, Edge migration can leave a host-side vhost symlink in the directory mounted into the OpenResty edge container. The symlink often targets /etc/nginx/sites-available/..., which is not mounted inside the container.
Reproduction
- Start with a conventional Nginx layout where
sites-enabled/app.confis a symlink to../sites-available/app.conf. - Run the OpenShip Edge migration.
- The migration passes the link through to the Edge state directory and starts the container.
The container then exits because the included vhost is a dangling absolute link inside the container:
[emerg] open() "/usr/local/openresty/nginx/conf/sites-enabled/openship.conf" failed (2: No such file or directory)
Expected behavior
Before mounting the vhost directory, migration should materialize valid symlinks as regular files and remove dangling/unreadable symlinks. The resulting Edge config must contain only container-readable files.
Additional context
Imported static vhosts may also refer to host paths that are not mounted into the Edge container. That is a separate adoption/mounting concern, but link materialization is required to prevent immediate container startup failure.
I have a focused regression test and patch ready for this behavior.