- Track Needle/MenuScene/dist and Needle/SampleScene/dist for container deploys - Dockerfile copies pre-built dist (no npm in image); rebuild with npm run build before commit - Fix Needle .gitignore: /assets/ so dist/assets is not ignored - Git LFS: track *.wasm; relax .dockerignore so dist is sent as build context Made-with: Cursor
17 lines
532 B
Docker
17 lines
532 B
Docker
# Serves pre-built Needle/Vite output from the repo (Needle/<app>/dist).
|
|
# Build locally first: cd Needle/MenuScene && npm run build
|
|
# Optional: Needle/SampleScene && npm run build (for compose profile "sample")
|
|
|
|
ARG NEEDLE_APP=MenuScene
|
|
|
|
FROM nginx:1.27-alpine
|
|
|
|
ARG NEEDLE_APP
|
|
COPY Needle/${NEEDLE_APP}/dist /usr/share/nginx/html
|
|
COPY docker/nginx-default.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
|
CMD wget -q -O /dev/null http://127.0.0.1/ || exit 1
|