Skip to content

Commit 01a1eb3

Browse files
authored
Merge pull request #81 from iranpsc/add/docker
2 parents 88b69b9 + c5c968d commit 01a1eb3

6 files changed

Lines changed: 37 additions & 4 deletions

File tree

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
node_modules
2+
.next
3+
out
4+
build
5+
dist
6+
7+
.git
8+
.vscode
9+
.idea
10+
11+
.DS_Store
12+
npm-debug.log*
13+
*.log

.next.zip

-36.8 MB
Binary file not shown.

dockerfile

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:22-alpine
1+
FROM node:20 AS builder
22

33
WORKDIR /app
44

@@ -7,8 +7,28 @@ RUN npm install
77

88
COPY . .
99

10+
ARG NEXT_PUBLIC_SUPABASE_URL
11+
ARG NEXT_PUBLIC_SUPABASE_ANON_KEY
12+
ARG NEXT_PUBLIC_BASE_URL
13+
ARG NEXT_PUBLIC_API_KEY
14+
15+
ENV NEXT_PUBLIC_SUPABASE_URL=$NEXT_PUBLIC_SUPABASE_URL
16+
ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=$NEXT_PUBLIC_SUPABASE_ANON_KEY
17+
ENV NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL
18+
ENV NEXT_PUBLIC_API_KEY=$NEXT_PUBLIC_API_KEY
19+
1020
RUN npm run build
1121

22+
23+
FROM node:20-alpine
24+
25+
WORKDIR /app
26+
27+
COPY --from=builder /app/package*.json ./
28+
COPY --from=builder /app/node_modules ./node_modules
29+
COPY --from=builder /app/.next ./.next
30+
COPY --from=builder /app/public ./public
31+
1232
EXPOSE 3000
1333

14-
CMD ["npm", "start"]
34+
CMD ["npm","start"]

metapersian-master.zip

-4.84 MB
Binary file not shown.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"version": "2.2.10",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev --webpack -p 5175",
6+
"dev": "next dev --webpack -p 5175/fa",
77
"build": "next build --webpack",
8-
"start": "next start -p 5175",
8+
"start": "next start",
99
"lint": "next lint",
1010
"release": "standard-version",
1111
"json": "json-server --watch db.json --port 3001"

public.zip

-10.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)