-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (27 loc) · 811 Bytes
/
Dockerfile
File metadata and controls
49 lines (27 loc) · 811 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
39
40
41
42
43
44
45
46
FROM node:alpine AS builder-base
WORKDIR /app
COPY package*.json ./
RUN npm ci && npm cache clean --force
COPY lib/ lib/
COPY ./*.json ./
RUN npm run transpile-esm
RUN rm -rf node_modules
FROM node:alpine AS builder-frontend
WORKDIR /app/frontend
COPY frontend/package*.json ./
RUN npm ci && npm cache clean --force
COPY --from=builder-base /app/lib ../lib
COPY frontend/ .
COPY backend/src ../backend/src
RUN npm run build-only
RUN rm -rf node_modules
FROM oven/bun:1.2.18-alpine AS server
WORKDIR /app/backend
COPY backend/package.json ./
RUN bun install --omit=dev && bun pm cache clean
COPY --from=builder-base /app/lib ../lib
COPY --from=builder-frontend /app/frontend/dist ../frontend/dist
COPY backend/ ./
RUN mv config.docker.ini config.ini
EXPOSE 5000
CMD ["bun", "run", "start"]