FROM node:lts as web # Reduce npm log spam and colour during install within Docker ENV NPM_CONFIG_LOGLEVEL=warn ENV NPM_CONFIG_COLOR=false WORKDIR /home/node/app COPY --chown=node:node web /home/node/app/ RUN npm install RUN npm run typecheck RUN npm run build FROM denoland/deno:1.42.3 as build-server WORKDIR /app COPY server /app COPY --from=web /home/node/app/build /app/web RUN deno cache server.ts USER deno CMD ["run", "--unstable-kv", "--allow-net", "--allow-read", "server.ts"]