-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (25 loc) · 719 Bytes
/
Copy pathDockerfile
File metadata and controls
40 lines (25 loc) · 719 Bytes
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
30
31
32
33
34
35
36
37
38
FROM node:lts-alpine AS base
WORKDIR /app
# Install curl
RUN apk --no-cache add curl
FROM base AS build
# Copy package.json and package-lock.json
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy the rest of the application code
COPY . .
# Build the application
RUN npm run build
FROM base AS runtime
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/build/server ./build/server
COPY --from=build /app/build/client ./build/client
COPY --from=build /app/package.json ./package.json
# Move the drizzle directory to the runtime image
COPY --from=build /app/drizzle ./drizzle
ENV HOST=0.0.0.0
ENV PORT=8000
ENV NODE_ENV=production
EXPOSE 8000
CMD ["npm", "run", "start"]