-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
63 lines (41 loc) · 1.62 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
53
54
55
56
57
58
59
60
61
62
63
FROM node:18.16.0-alpine AS build
ARG BUILD_MODE
WORKDIR /visphere
COPY visphere-base/tailwind visphere-base/tailwind/
COPY visphere-base/webpack visphere-base/webpack/
COPY visphere-base/s3-static visphere-base/s3-static/
COPY visphere-base/.env visphere-base/
COPY visphere-base/package.json visphere-base/
COPY visphere-base/yarn.lock visphere-base/
COPY visphere-landing-page/.vite visphere-landing-page/.vite/
COPY visphere-landing-page/public visphere-landing-page/public/
COPY visphere-landing-page/src visphere-landing-page/src/
COPY visphere-landing-page/entrypoint.sh visphere-landing-page/
COPY visphere-landing-page/package.json visphere-landing-page/
COPY visphere-landing-page/tailwind.config.cjs visphere-landing-page/
COPY visphere-landing-page/tsconfig.json visphere-landing-page/
COPY visphere-landing-page/yarn.lock visphere-landing-page/
WORKDIR /visphere/visphere-base
RUN yarn install
WORKDIR /visphere/visphere-landing-page
RUN mkdir dist
RUN yarn install
RUN yarn run docker:$BUILD_MODE
WORKDIR /visphere
RUN rm -rf visphere-base
FROM build AS prod-deps
WORKDIR /visphere/visphere-landing-page
RUN yarn install --prod
FROM node:18.16.0-alpine
LABEL maintainer="Visphere <[email protected]>"
RUN mkdir -p vsph/dist
RUN mkdir -p vsph/node_modules
WORKDIR /vsph
COPY --from=prod-deps /visphere/visphere-landing-page/node_modules /vsph/node_modules
COPY --from=build /visphere/visphere-landing-page/dist/ /vsph/dist
COPY visphere-landing-page/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENV HOST=0.0.0.0
ENV PORT=80
EXPOSE 80
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]