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
34 changes: 34 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Ignore node modules
node_modules

# Ignore build output
.next
out

# Ignore local env files
.env
.env.local
.env.*.local

# Ignore logs
npm-debug.log
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Ignore Git
.git
.gitignore

# Ignore Dockerfile itself?
Dockerfile

# Ignore OS-specific files
.DS_Store

# Ignore editor settings
.vscode
.idea

# Ignore caches
.next/cache
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

FROM node:20-alpine AS runner
WORKDIR /app
COPY --from=builder /app ./
EXPOSE 3000
CMD ["npm", "start"]
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ You can start editing the page by modifying `app/(public)/page.js`. The page aut

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Outfit](https://vercel.com/font), a new font family for Vercel.

---
## Docker

You can run GoCart using Docker withou installing Node.js locally.

#### Build the image
```bash
docker build -t gocart-app .
```

#### Run the container
```bash
docker run -d -p 3000:3000 gocart-app
```

#### Open in browser
Go to http://localhost:3000 to view the app.

---

## 🤝 Contributing <a name="-contributing"></a>
Expand Down