Skip to content

Commit e012e64

Browse files
Merge pull request #22 from ARYPROGRAMMER/preview-deployment
adding docker file
2 parents 6c641f0 + efdf68f commit e012e64

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

Dockerfile

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Use an official Node.js image
2+
FROM node:18-alpine
3+
4+
# Set working directory
5+
WORKDIR /app
6+
7+
# Copy package.json and package-lock.json
8+
COPY package*.json ./
9+
10+
# Install dependencies with the legacy peer deps option
11+
RUN npm install --legacy-peer-deps
12+
13+
# Copy the entire application code
14+
COPY . .
15+
16+
# Build the Next.js application
17+
RUN npm run build
18+
19+
# Expose the default Next.js port
20+
EXPOSE 3000
21+
22+
# Start the Next.js application
23+
CMD ["npm", "run", "start"]

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# CodeX
2+
3+
## Update: 1.0.0
4+
docker-compose up --build : to build the project
5+
contact me to get the env file for the project
6+
7+
Mail To : arya.2023ug1104@iiitranchi.ac.in
8+
"On Paid Basis"
9+
210
---
311
## Under Development, Support the development [Here](https://buymeacoffee.com/aryasingh) and get early access to the project.
412
---

docker-compose.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: '3.8'
2+
3+
services:
4+
nextjs-app:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
ports:
9+
- "3000:3000"
10+
env_file:
11+
- .env.local
12+
restart: always
13+
command: npm run start

0 commit comments

Comments
 (0)