BG5 commited on
Commit
dcfd6a1
·
1 Parent(s): 08dabf8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -56
Dockerfile CHANGED
@@ -1,56 +1,7 @@
1
- FROM node:20-alpine AS base
2
- USER root
3
-
4
- ENV PNPM_HOME="/pnpm"
5
- ENV PATH="$PNPM_HOME:$PATH"
6
-
7
- RUN npm i -g pnpm
8
-
9
- FROM base AS builder
10
-
11
- WORKDIR /app
12
-
13
- COPY . .
14
-
15
-
16
-
17
-
18
- # Add lockfile and package.json's of isolated subworkspace
19
- FROM base AS installer
20
-
21
- WORKDIR /app
22
-
23
- # First install the dependencies (as they change less often)
24
- COPY .gitignore .gitignore
25
- COPY --from=builder /app/out/json/ .
26
- COPY --from=builder /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
27
- RUN pnpm install
28
-
29
- # Build the project
30
- COPY ./config.yaml /app/config.yaml
31
- COPY --from=builder /app/out/full/ .
32
- RUN pnpx turbo run db:generate \
33
- & pnpx turbo run build --filter=chat...
34
-
35
- FROM base AS runner
36
-
37
- ENV HOSTNAME=0.0.0.0
38
- ENV PORT=3000
39
-
40
- WORKDIR /app
41
-
42
- # Don't run production as root
43
- RUN addgroup --system --gid 1001 nodejs
44
- RUN adduser --system --uid 1001 nextjs
45
- USER nextjs
46
-
47
- COPY --from=installer /app/packages/frontend/next.config.js .
48
- COPY --from=installer /app/packages/frontend/package.json .
49
-
50
- # Automatically leverage output traces to reduce image size
51
- # https://nextjs.org/docs/advanced-features/output-file-tracing
52
- COPY --from=installer --chown=nextjs:nodejs /app/packages/frontend/.next/standalone ./
53
- COPY --from=installer --chown=nextjs:nodejs /app/packages/frontend/.next/static ./packages/frontend/.next/static
54
- COPY --from=installer --chown=nextjs:nodejs /app/packages/frontend/public ./packages/frontend/public
55
-
56
- CMD node packages/frontend/server.js
 
1
+ FROM node:18
2
+ RUN git clone https://github.com/Nanjiren01/AIChatWeb.git
3
+ WORKDIR "AIChatWeb"
4
+ RUN npm i
5
+ RUN npm run build
6
+ EXPOSE 3000
7
+ CMD ["npm", "run", "start"]