Skip to content

Commit

Permalink
More tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
BusterNeece committed Dec 12, 2023
1 parent ddc5049 commit e4217a7
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,29 @@ CMD ["npm", "run", "dev"]

FROM base AS production-builds

RUN mkdir -p /dist

WORKDIR /data
COPY . .

USER node

RUN npm ci --include=dev

FROM production-builds AS build

USER node

RUN npm ci --include=dev \
&& npm run build \
&& rm -rf /data/node_modules \
&& cp -RT /data/dist /dist
&& mv /data/dist /dist

FROM production-builds AS builtin

USER node

WORKDIR /data/builtin

RUN rm -rf ./src \
&& rm -rf ./dist \
&& rm -rf ./public \
RUN rm -rf ./src ./dist ./public \
&& mkdir -p ./src/content ./src/images ./src/scss \
&& cp ../src/content/config.ts ./src/content \
&& cp -R ../src/content/docs/docs ./src/content/docs \
Expand All @@ -66,5 +68,7 @@ RUN rm -rf ./src \
&& cd .. \
&& npm ci --include=dev \
&& npm run builtin-build \
&& rm -rf /data/node_modules \
&& cp -RT /data/builtin/dist /dist
&& rm -rf ./node_modules \
&& cd builtin \
&& rm -rf ./src ./dist ./public \
&& mv ./dist /dist

0 comments on commit e4217a7

Please sign in to comment.