forked from kubero-dev/kubero
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (33 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
45 lines (33 loc) · 1.01 KB
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
FROM node:22-alpine AS build
ENV NODE_ENV=development
WORKDIR /build
## Server
COPY server ./server
RUN cd /build/server && \
yarn install
RUN cd /build/server && \
yarn build
## Client
COPY client ./client
RUN cd /build/client && \
yarn install
RUN cd /build/client && \
yarn build
FROM node:22-alpine AS release
ARG VERSION=unknown
LABEL maintainer='www.kubero.dev'
LABEL version=$VERSION
ENV NODE_ENV=production
WORKDIR /app/
COPY --from=build /build/server/dist /app/server
COPY --from=build /build/server/package.json /app/server/package.json
COPY --from=build /build/server/src/deployments/templates /app/server/deployments/templates
COPY --from=build /build/server/node_modules /app/server/node_modules
COPY server/prisma /app/server/prisma
# temporary fix for the public folder
COPY --from=build /build/server/dist/public /app/server/public
ENV DATABASE_URL=file:/app/server/db/kubero.sqlite
ENV DATABASE_TYPE=sqlite
RUN echo -n $VERSION > /app/server/VERSION
WORKDIR /app/server
CMD [ "node", "main" ]