Spaces:
Sleeping
Sleeping
eienmojiki
commited on
Commit
•
5f0db80
1
Parent(s):
5334175
Update Dockerfile
Browse files- Dockerfile +25 -2
Dockerfile
CHANGED
@@ -1,6 +1,29 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
EXPOSE 8787
|
6 |
|
|
|
1 |
+
FROM node:22-alpine AS builder
|
2 |
|
3 |
+
RUN apk add git
|
4 |
+
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
RUN git clone https://github.com/CorentinTh/enclosed
|
8 |
+
|
9 |
+
WORKDIR /app/enclosed
|
10 |
+
|
11 |
+
RUN npm install -g pnpm --ignore-scripts && \
|
12 |
+
pnpm install --frozen-lockfile --ignore-scripts
|
13 |
+
|
14 |
+
RUN pnpm --filter @enclosed/crypto run build && \
|
15 |
+
pnpm --filter @enclosed/lib run build && \
|
16 |
+
pnpm --filter @enclosed/app-client run build && \
|
17 |
+
pnpm --filter @enclosed/app-server run build:node
|
18 |
+
|
19 |
+
FROM node:22-alpine
|
20 |
+
|
21 |
+
WORKDIR /app
|
22 |
+
|
23 |
+
COPY --from=builder /app/packages/app-client/dist ./public
|
24 |
+
COPY --from=builder /app/packages/app-server/dist-node/index.cjs ./index.cjs
|
25 |
+
|
26 |
+
RUN mkdir -p /app/.data && chmod 777 /app/.data
|
27 |
|
28 |
EXPOSE 8787
|
29 |
|