Refactor Dockerfile commands for astro and payload folders

This commit is contained in:
Max Schmidt 2023-08-11 00:33:40 +02:00
parent c9574334a4
commit 5ccf5071fa
4 changed files with 6 additions and 8 deletions

View File

@ -1,4 +1,3 @@
node_modules
yarn.lock
Dockerfile
README.md

View File

@ -1,8 +1,8 @@
FROM node:lts-alpine as base
WORKDIR /base
COPY ./package.json ./package.json
RUN yarn install
COPY ./ ./
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
FROM base AS dev
ENV NODE_ENV=development
@ -12,7 +12,7 @@ CMD ["yarn","dev"]
FROM base AS build
ENV NODE_ENV=production
WORKDIR /build
COPY --from=base /base ./
COPY --from=base /base .
ADD "https://random-uuid.deno.dev" skipcache
RUN yarn build

View File

@ -1,3 +1,2 @@
node_modules
yarn.lock
Dockerfile

View File

@ -1,7 +1,7 @@
FROM node:lts-alpine as base
WORKDIR /base
COPY ./package.json .
RUN yarn install
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
FROM base AS dev