-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (21 loc) · 569 Bytes
/
Dockerfile
File metadata and controls
24 lines (21 loc) · 569 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
# syntax = docker/dockerfile:1
FROM node:22-slim AS base
LABEL fly_launch_runtime="Node.js"
WORKDIR /app
FROM base AS build
ENV NODE_ENV="production"
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
build-essential=12.9 pkg-config=1.8.1-1 python-is-python3=3.11.2-1+deb12u1
COPY package-lock.json package.json ./
RUN npm ci --omit=dev
COPY . .
RUN npm run build && npm prune --omit=dev
FROM base
ENV NODE_ENV="production"
COPY --from=build /app /app
RUN mkdir -p /app/db
VOLUME /app/db
EXPOSE 3000
ENV host="0.0.0.0"
CMD [ "npm", "start" ]