Files
myocardial/docker/nginx.Dockerfile
T
sulthan 04280c578c fix: build Vite assets in app container, harden docker deploy
App (PHP-FPM) container never got public/build/manifest.json, only
the nginx container built it — blade's @vite runs server-side in PHP
and threw "Vite manifest not found", causing 500 on every page.

Also:
- strip docker/ (incl. DB dump) from the shipped app image
- pin npm installs to package-lock.json via npm ci in both build stages
- fix .dockerignore case typo (Docker/Dockerfile -> docker/Dockerfile)
- pass AWS_* env vars to app service, required since FILESYSTEM_DISK=s3

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 13:31:03 +07:00

12 lines
335 B
Docker

FROM node:20-alpine AS node-builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --ignore-scripts
COPY . .
RUN npm run build:icons && npm run build
FROM nginx:alpine
RUN rm /etc/nginx/conf.d/default.conf
COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=node-builder /app/public /var/www/html/public