Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Dockerfile 682 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  1. FROM --platform=${BUILDPLATFORM} node:20-alpine
  2. FROM node:20-alpine AS base
  3. # Install dependencies only when needed
  4. FROM base AS builder
  5. # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
  6. RUN apk add --no-cache libc6-compat
  7. WORKDIR /app
  8. # Set environment variables for the build
  9. ENV NEXT_PUBLIC_HOSTED=1
  10. COPY . .
  11. RUN npm install --install-links --include=peer
  12. RUN npm run build
  13. FROM base AS server
  14. WORKDIR /app
  15. COPY --from=builder /app/node_modules ./node_modules
  16. COPY --from=builder /app/dist ./dist
  17. ENV API_PORT=3000
  18. EXPOSE 3000
  19. CMD ["node", "dist/src/server/index.js"]
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...