forked from daytonaio/daytona
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (27 loc) · 1.17 KB
/
Copy pathDockerfile
File metadata and controls
42 lines (27 loc) · 1.17 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
FROM node:20-alpine AS builder
ENV CI=true
RUN npm install -g corepack && corepack enable
WORKDIR /daytona
# Yarn caching layer
COPY package.json yarn.lock .yarnrc.yml ./
RUN yarn install --immutable
# Nx + TS config
COPY nx.json tsconfig.base.json .nxignore ./
# App source
COPY apps/dashboard/ apps/dashboard/
# Lib dependencies
COPY libs/api-client/ libs/api-client/
COPY libs/analytics-api-client/ libs/analytics-api-client/
COPY libs/toolbox-api-client/ libs/toolbox-api-client/
COPY libs/sdk-typescript/ libs/sdk-typescript/
COPY libs/billing-api-client/ libs/billing-api-client/
ENV NX_DAEMON=false
RUN VITE_BASE_PATH=/dashboard/ VITE_API_URL=%DAYTONA_BASE_API_URL%/api yarn nx build dashboard --configuration=production --nxBail=true
FROM nginx:alpine as dashboard
COPY --from=builder /daytona/dist/apps/dashboard /usr/share/nginx/html/dashboard
COPY --from=builder /daytona/apps/dashboard/docker/nginx/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /daytona/apps/dashboard/docker/entrypoint.sh /entrypoint.sh
ENV DAYTONA_BASE_API_URL="http://api:3000"
EXPOSE 80
HEALTHCHECK CMD [ "wget", "-q", "--spider", "http://localhost/" ]
ENTRYPOINT ["/entrypoint.sh"]