feat: deploy on Caprover directly

This commit is contained in:
Pierre Martin
2023-05-08 12:15:59 +02:00
parent 751954d0ac
commit 5df925dffe
4 changed files with 28 additions and 2 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM node:20 as builder
WORKDIR /app
RUN npm install -g pnpm@8
COPY . .
RUN pnpm install && pnpm build
# See https://lipanski.com/posts/smallest-docker-image-static-website
FROM busybox:1.36
RUN adduser -D static
USER static
WORKDIR /home/static
COPY --from=builder /app/public .
# Run BusyBox httpd
EXPOSE 3000
CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"]