feat: self host packaging (HBE-166) (#41)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
5
packages/hoppscotch-selfhost-web/Caddyfile
Normal file
5
packages/hoppscotch-selfhost-web/Caddyfile
Normal file
@@ -0,0 +1,5 @@
|
||||
:8080 {
|
||||
try_files {path} /
|
||||
root * /site
|
||||
file_server
|
||||
}
|
||||
21
packages/hoppscotch-selfhost-web/Dockerfile
Normal file
21
packages/hoppscotch-selfhost-web/Dockerfile
Normal 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
|
||||
@@ -37,6 +37,9 @@ export default defineConfig({
|
||||
build: {
|
||||
sourcemap: true,
|
||||
emptyOutDir: true,
|
||||
rollupOptions: {
|
||||
maxParallelFileOps: 2,
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
Reference in New Issue
Block a user