Dockerfile 492 B

123456789101112131415161718192021
  1. # Initial stage, just build the app
  2. FROM node:lts as builder
  3. WORKDIR /usr/src/app
  4. RUN npm i -g pnpm
  5. COPY . .
  6. RUN pnpm install --force --frozen-lockfile
  7. WORKDIR /usr/src/app/packages/hoppscotch-sh-admin/
  8. RUN pnpm run build
  9. # Final stage, take the build artifacts and package it into a static Caddy server
  10. FROM caddy:2-alpine
  11. WORKDIR /site
  12. COPY packages/hoppscotch-sh-admin/Caddyfile /etc/caddy/Caddyfile
  13. COPY --from=builder /usr/src/app/packages/hoppscotch-sh-admin/dist/ .
  14. EXPOSE 8080