diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..dee3d83 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +dist +node_modules +.git +.DS_Store \ No newline at end of file diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 0000000..0e34370 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,6 @@ +:80 { + root * /srv + encode gzip zstd + try_files {path} /index.html + file_server +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..df405b1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM oven/bun:1.2.10 AS build + +WORKDIR /app + +COPY package.json ./ +COPY bun.lock tsconfig.json bunfig.toml build.ts ./ +COPY src ./src + +RUN bun install +RUN bun run build + +FROM caddy:2.8-alpine + +COPY Caddyfile /etc/caddy/Caddyfile +COPY --from=build /app/dist /srv + +EXPOSE 80