Skip to content
Open
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
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
.next
.git
.gitignore
Dockerfile
docker-compose.yml
README.md
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# ---------- 1️⃣ Builder Stage ----------
FROM node:18-alpine AS builder

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

RUN npm run build


# ---------- 2️⃣ Runner Stage ----------
FROM node:18-alpine

WORKDIR /app

# Copy only package files
COPY package*.json ./

# Install ONLY production dependencies
RUN npm install --omit=dev

# Copy built files from builder
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public

EXPOSE 3000

CMD ["npm", "start"]
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ This repo is **frontend only** – contributors can improve the design, add new
```

---
## 🐳 Run with Docker (Production)

Build the Docker image:

```bash
docker build -t quickcart-prod .

Run the container:
docker run -p 3000:3000 quickcart-prod
Then open:
http://localhost:3000

## Contributing

Expand Down Expand Up @@ -66,4 +77,4 @@ This project is licensed under the **MIT License**.

## 🌟 Contributors

Thanks to everyone who contributes to **QuickCart**!
Thanks to everyone who contributes to **QuickCart**!