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 node_modules
yarn.lock
Dockerfile Dockerfile
README.md README.md

View File

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

View File

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

View File

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