forked from binimum/tidal-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (26 loc) · 842 Bytes
/
Dockerfile
File metadata and controls
36 lines (26 loc) · 842 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
# Use a Node.js Slim image for the builder stage
FROM node:24.0.1-slim AS builder
# Set the working directory
WORKDIR /app
# Copy package files and install dependencies
COPY package*.json ./
RUN npm ci
# Copy the rest of the source files and build the SvelteKit app
COPY . .
RUN npm run build
# Prune dependencies to production-only
RUN npm prune --production
# Use another Node.js Slim image for the final stage
FROM node:24.0.1-slim AS runner
# Set the working directory
WORKDIR /app
# Copy the built app and production node_modules from the builder stage
COPY --from=builder /app/build build/
COPY --from=builder /app/node_modules node_modules/
COPY package.json .
# Expose the port the app runs on
EXPOSE 5000
# Set the environment to production
ENV NODE_ENV=production
# Specify the command to run the app
CMD ["node", "build"]