Bhargavssss commited on
Commit
a14955b
·
verified ·
1 Parent(s): 47cc8db

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:22-alpine AS build
2
+
3
+ # Install git
4
+ RUN apk add --no-cache git
5
+
6
+ WORKDIR /app
7
+
8
+ # Clone the repository
9
+ RUN git clone https://github.com/al1abb/invoify .
10
+
11
+ # Install dependencies and build
12
+ RUN npm install
13
+ RUN npm run build
14
+
15
+
16
+ FROM node:22-alpine AS production
17
+
18
+ RUN addgroup --system --gid 1001 nodejs
19
+ RUN adduser --system --uid 1001 nextjs
20
+
21
+ COPY --from=build --chown=nextjs:nodejs /app/.next ./.next
22
+ COPY --from=build --chown=nextjs:nodejs /app/node_modules ./node_modules
23
+ COPY --from=build --chown=nextjs:nodejs /app/package.json ./package.json
24
+ COPY --from=build --chown=nextjs:nodejs /app/public ./public
25
+
26
+ USER nextjs
27
+
28
+ EXPOSE 3000
29
+ CMD npm start