forked from MarSeventh/CloudFlare-ImgBed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 941 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (24 loc) · 941 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
FROM node:22-slim AS dependencies
WORKDIR /app
COPY package.json package-lock.json ./
COPY deploy/profiles ./deploy/profiles
RUN apt-get update && \
apt-get install -y --no-install-recommends python3 make g++ && \
npm ci --workspace=@cloudflare-imgbed/common --workspace=@cloudflare-imgbed/server --omit=dev && \
rm -rf /root/.npm /var/lib/apt/lists/* /tmp/*
FROM node:22-slim AS runtime
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates curl && \
update-ca-certificates && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
ENV NODE_ENV=production
COPY --from=dependencies /app/node_modules ./node_modules
COPY package.json ./
COPY deploy/profiles ./deploy/profiles
COPY frontend-dist ./frontend-dist
COPY functions ./functions
COPY database ./database
COPY deploy/server ./deploy/server
EXPOSE 8080
CMD ["node", "--import", "./deploy/server/register.mjs", "deploy/server/index.js"]