2023-05-13 17:10:37 +00:00
|
|
|
FROM node:lts-alpine as base
|
|
|
|
WORKDIR /base
|
2023-08-10 22:33:40 +00:00
|
|
|
COPY package.json yarn.lock ./
|
|
|
|
RUN yarn install --frozen-lockfile
|
|
|
|
COPY . .
|
2023-05-13 17:10:37 +00:00
|
|
|
|
|
|
|
FROM base AS dev
|
|
|
|
ENV NODE_ENV=development
|
|
|
|
EXPOSE 3000
|
2023-07-28 15:02:19 +00:00
|
|
|
CMD ["yarn","dev"]
|
2023-05-13 17:10:37 +00:00
|
|
|
|
|
|
|
FROM base AS build
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
WORKDIR /build
|
2023-08-10 22:33:40 +00:00
|
|
|
COPY --from=base /base .
|
2023-06-18 17:32:54 +00:00
|
|
|
ADD "https://random-uuid.deno.dev" skipcache
|
2023-07-28 15:02:19 +00:00
|
|
|
RUN yarn build
|
2023-05-13 17:10:37 +00:00
|
|
|
|
2023-08-11 09:05:01 +00:00
|
|
|
FROM denoland/deno:1.36.1 AS prod
|
|
|
|
WORKDIR /site
|
|
|
|
RUN deno install --allow-net --allow-read https://deno.land/std@0.198.0/http/file_server.ts
|
|
|
|
COPY --from=build /build/dist .
|
2023-08-11 09:05:18 +00:00
|
|
|
CMD ["file_server", "--port", "3000", "--no-dir-listing"]
|
2023-05-17 07:18:08 +00:00
|
|
|
EXPOSE 3000
|