tjo.space/Dockerfile
Tine 81792268c8
All checks were successful
ci / docker (push) Successful in 4m35s
feat: replace nginx with deno
2024-04-20 20:18:38 +02:00

24 lines
495 B
Docker

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"]