Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**/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.
**/.env
**/.env.*
Dockerfile
Dockerfile.dev
docker-compose.yml
.dockerignore
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"]
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,44 @@
Repository for the AboutCode public website - based on Docusaurus.

The current draft website is available at: https://aboutcode-org.github.io/www.aboutcode.org/.

## Development

### With Docker (Recommended)

**Development server with hot reload:**
```bash
docker-compose up dev
```
Access at http://localhost:3001/www.aboutcode.org/

**Production build:**
```bash
docker-compose up prod
```
Access at http://localhost:8080/www.aboutcode.org/

### Without Docker

Install dependencies and run:
```bash
cd website
npm install
npm start
```
Access at http://localhost:3000/www.aboutcode.org/

## Building

**Build static files:**
```bash
cd website
npm run build
```

**With Docker:**
```bash
docker build -t aboutcode-prod .
docker run -p 8080:80 aboutcode-prod
```

18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
dev:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "3001:3000"
volumes:
- ./website:/app
environment:
- NODE_ENV=development

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