-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
52 lines (33 loc) · 1.17 KB
/
Dockerfile
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
47
48
49
50
51
52
FROM node:22-bookworm as dashboardBuild
RUN mkdir -p /tmp/frontend
WORKDIR /tmp/frontend
COPY apps/dashboard /tmp/frontend
COPY apps/models /tmp/models
RUN npm ci
RUN npm run build
FROM oven/bun:1.1.7-debian as backendBuild
RUN mkdir -p /tmp/backend
WORKDIR /tmp/backend
COPY apps/linkos/ /tmp/backend
COPY apps/models /tmp/models
RUN bun install
FROM oven/bun:1.1.7-debian
RUN mkdir -p /usr/server/app
COPY --from=backendBuild /tmp/backend /usr/server/app/
COPY --from=backendBuild /tmp/models /usr/server/models/
RUN mkdir -p /usr/server/app/frontend/dashboard
COPY --from=dashboardBuild /tmp/frontend/dist /usr/server/app/frontend/dashboard
COPY ./apps/linkos/bin /usr/local/bin
RUN chmod +x /usr/local/bin/serve && \
chmod +x /usr/local/bin/serve-watch && \
chmod +x /usr/local/bin/serve-links && \
chmod +x /usr/local/bin/serve-links-watch && \
chmod +x /usr/local/bin/analytics && \
chmod +x /usr/local/bin/analytics-watch && \
chmod +x /usr/local/bin/scheduler && \
chmod +x /usr/local/bin/scheduler-watch && \
chmod +x /usr/local/bin/webhooks && \
chmod +x /usr/local/bin/webhooks-watch
WORKDIR /usr/server/app/
EXPOSE 3000
CMD serve