Files
gregWiki/Dockerfile
Marvin 31cd24b462 chore(docker): compose, entrypoint guard, LF shell script; format with Prettier
- Add docker-compose.yml (build context .) and .gitattributes for entrypoint LF
- README: document docker compose and gregWiki root requirement
- package.json: include docker-compose.yml in npm run format

Made-with: Cursor
2026-04-10 00:05:51 +02:00

16 lines
702 B
Docker

# Build context MUST be this repository root (directory containing package.json).
# Correct: docker build -t gregwiki .
# Wrong: docker build -f gregWiki/Dockerfile .. → COPY fails or image has no package.json
# Dev server with hot reload. For production static files use: npm run build + any static host.
FROM node:20-alpine
WORKDIR /app
ENV NODE_OPTIONS="--max-old-space-size=4096"
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
COPY package.json package-lock.json ./
RUN npm ci --ignore-scripts
COPY . .
EXPOSE 3000
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["npm", "run", "start", "--", "--host", "0.0.0.0", "--port", "3000"]