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
This commit is contained in:
Marvin
2026-04-10 00:05:51 +02:00
parent 1d4676f52b
commit 31cd24b462
6 changed files with 31 additions and 14 deletions

View File

@@ -1,10 +1,15 @@
# Build context: this repository root (gregWiki).
# Runs the Docusaurus dev server with hot reload.
# 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"]