fix(dev): support root bind mounts and LAN Vite access

Keep the dev container as root for s6 init so composer can create
vendor/ on root-owned mounts, then chown writable paths to www-data.
Move init-setup into a shell script and expose VITE_HOST/PORT for
remote HMR (LAN/Tailscale) with Vite listening on 0.0.0.0.
This commit is contained in:
Andras Bacsai
2026-07-18 20:56:01 +02:00
parent 913d033c75
commit e2c2180f4f
20 changed files with 80 additions and 44 deletions
+5 -2
View File
@@ -98,5 +98,8 @@ RUN mkdir -p /etc/nginx/conf.d && \
COPY --from=minio-client /usr/bin/mc /usr/bin/mc
RUN chmod +x /usr/bin/mc
# Switch to non-root user
USER www-data
# Stay as root for s6 init so bind-mounted workspaces work even when the host
# tree is root-owned (CI, Jean, rootful Docker). PHP-FPM/nginx still run as
# www-data via their service configs. Do NOT set USER www-data here — that
# makes init-setup (composer install) fail with "vendor could not be created".
USER root