Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Stage 1: Build
FROM node:20-alpine AS builder
WORKDIR /app
COPY . .
Comment thread
make-ki marked this conversation as resolved.
RUN npm install
RUN npm run build
Comment thread
coderabbitai[bot] marked this conversation as resolved.

# Stage 2: Serve with nginx
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ npm run build
npm run preview
```

You can also build a docker image and run the build isolately, without any setup overhead.
```bash
# After cloning and changing directory
docker build -t algorithima:latest .

# To run the image
docker run -d --name dsa_website \
-p 1234:80 \
algorithima:latest
# Build will be running on port localhost:1234, if the port is busy, put another port in docker run command.
```

---

## 🏗️ Tech Stack
Expand Down
Loading