refactor(dockerfile): make it more readable@@ -3,25 +3,25 @@ FROM node:alpine as builder
ENV NODE_ENV=production
ENV PORT=4100
-WORKDIR /app/build
+WORKDIR /app/build # as .
-COPY ./patches .
-COPY ./package.json .
-COPY ./yarn.lock .
+COPY ./patches .
+COPY ./package.json .
+COPY ./yarn.lock .
-RUN yarn # Install dependencies
+RUN yarn # Install dependencies
-COPY ./app .
-COPY ./db .
-COPY ./public .
-COPY ./types .
+COPY ./app .
+COPY ./db .
+COPY ./public .
+COPY ./types .
COPY ./app.manifest.json .
COPY ./paths.ts .
COPY ./tsconfig.json .
-COPY ReadMe.md .
-COPY LICENSE .
+COPY ReadMe.md .
+COPY LICENSE .
RUN yarn typecheck # Validate TS types are valid first
RUN yarn clean # Cleanup working dir
@@ -29,7 +29,7 @@ RUN yarn generate:prisma # Generate Prisma Client from schema (db/schema.prism
RUN yarn build:ts # Transpile TypeScript to JavaScript (node)
RUN yarn bundle:islands # Bundle Islands (react-monolith) to ESM/CJS/UMD
-# If everything went well, issue a git stamp file containing built commit hash.
+# Issue a git stamp file containing built commit hash
RUN echo "$(git rev-parse HEAD)" >> .gitstamp
FROM node:slim as base
@@ -37,7 +37,7 @@ FROM node:slim as base
ENV NODE_ENV=production
ENV PORT=4100
-WORKDIR /app
+WORKDIR /app # as .
COPY --from=builder /app/build/.gitstamp .
COPY --from=builder /app/build/dist .