2022-08-04 11:17:46 +03:00
|
|
|
FROM node:16-alpine as builder
|
|
|
|
WORKDIR /app
|
2022-09-11 10:25:41 +03:00
|
|
|
RUN apk add git && npm i -g pnpm@7
|
2022-08-04 11:17:46 +03:00
|
|
|
COPY . .
|
2022-08-17 12:35:56 +03:00
|
|
|
# RUN apk add g++ make python3 git libpng-dev
|
2022-09-11 11:10:25 +03:00
|
|
|
RUN --mount=type=cache,target=/app/node_modules,rw,sharing=private pnpm i --frozen-lockfile --store=node_modules/.pnpm-store --filter "!ligo-virgo-e2e" --filter "!keck" --filter "!venus" && pnpm run build:local --skip-nx-cache
|
2022-08-04 11:17:46 +03:00
|
|
|
|
|
|
|
FROM node:16-alpine as relocate
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/dist/apps/ligo-virgo ./dist
|
2022-08-04 12:13:24 +03:00
|
|
|
COPY --from=builder /app/.github/deployment/Caddyfile-affine ./Caddyfile
|
2022-08-04 11:17:46 +03:00
|
|
|
RUN rm ./dist/*.txt
|
|
|
|
|
|
|
|
# =============
|
2022-08-04 11:22:15 +03:00
|
|
|
# AFFiNE image
|
2022-08-04 11:17:46 +03:00
|
|
|
# =============
|
2022-08-04 11:22:15 +03:00
|
|
|
FROM caddy:2.4.6-alpine as AFFiNE
|
2022-08-04 11:17:46 +03:00
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=relocate /app .
|
|
|
|
|
|
|
|
EXPOSE 3000
|
2022-08-09 20:32:32 +03:00
|
|
|
CMD ["caddy", "run"]
|