Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**/node_modules
**/npm-debug.log
**/.git
**/.gitignore
README.md
**/.DS_Store
**/build
**/.docusaurus
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a .env file pattern to .dockerignore to prevent accidentally copying environment files with sensitive data into Docker images. While not currently present in the repository, this is a common best practice to prevent security issues.

Suggested change
**/.docusaurus
**/.docusaurus
**/.env
**/.env.*

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .dockerignore file should include Docker-related files to prevent them from being copied into the build context. Add the following entries:

  • Dockerfile
  • Dockerfile.dev
  • docker-compose.yml
  • .dockerignore

This prevents these files from being unnecessarily included in the Docker build context and potentially copied into the image.

Suggested change
**/.docusaurus
**/.docusaurus
Dockerfile
Dockerfile.dev
docker-compose.yml
.dockerignore

Copilot uses AI. Check for mistakes.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:20-alpine AS build

WORKDIR /app

COPY website/package*.json ./
RUN npm ci

COPY website/ ./
RUN npm run build

FROM nginx:alpine
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
11 changes: 11 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:20-alpine

WORKDIR /app

COPY website/package*.json ./
RUN npm install

COPY website/ ./

EXPOSE 3000
CMD ["npm", "start", "--", "--host", "0.0.0.0"]
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
dev:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "3001:3000"
volumes:
- ./website:/app
- /app/node_modules
Copy link

Copilot AI Jan 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The volume mount configuration may cause issues with the development workflow. The volume maps ./website to /app, which will override the node_modules installed in the container during the build process (from COPY and RUN npm install in Dockerfile.dev). While line 10 attempts to preserve the container's node_modules with an anonymous volume, this can lead to inconsistencies.

Consider whether the COPY steps in Dockerfile.dev are necessary if you're mounting the source code as a volume. Typically, for development with hot reload, you would either:

  1. Remove the COPY steps from Dockerfile.dev and rely entirely on the volume mount, or
  2. Not use volume mounts and rebuild the container when dependencies change

The current approach mixes both strategies which can be confusing.

Suggested change
- /app/node_modules

Copilot uses AI. Check for mistakes.
environment:
- NODE_ENV=development

prod:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:80"