feat: self host packaging (HBE-166) (#41)

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
Ankit Sridhar
2023-04-04 03:17:18 +05:30
committed by GitHub
parent 71e1ada641
commit 8bdb9a657f
22 changed files with 5150 additions and 5152 deletions

View File

@@ -0,0 +1,5 @@
:8080 {
try_files {path} /
root * /site
file_server
}

View File

@@ -0,0 +1,21 @@
# Initial stage, just build the app
FROM node:lts as builder
WORKDIR /usr/src/app
RUN npm i -g pnpm
COPY . .
RUN pnpm install
WORKDIR /usr/src/app/packages/hoppscotch-selfhost-web/
RUN pnpm run build
# Final stage, take the build artifacts and package it into a static Caddy server
FROM caddy:2-alpine
WORKDIR /site
COPY packages/hoppscotch-selfhost-web/Caddyfile /etc/caddy/Caddyfile
COPY --from=builder /usr/src/app/packages/hoppscotch-selfhost-web/dist/ .
EXPOSE 8080

View File

@@ -37,6 +37,9 @@ export default defineConfig({
build: {
sourcemap: true,
emptyOutDir: true,
rollupOptions: {
maxParallelFileOps: 2,
},
},
resolve: {
alias: {