mirror of
https://github.com/mleem97/gregWiki.git
synced 2026-04-10 19:19:18 +02:00
- 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
16 lines
702 B
Docker
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"]
|