diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0af163e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,18 @@ +node_modules +Dockerfile* +docker-compose* +.dockerignore +.git +.gitignore +README.md +LICENSE +.vscode +Makefile +helm-charts +.editorconfig +.idea +coverage* +.svelte-kit +.storybook +tbm-m2-dev-90d717d5e58a.json +env* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4225035..ed7466d 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,7 @@ vite.config.ts.timestamp-* *storybook.log storybook-static + +tbm-m2-dev-90d717d5e58a.json +env* + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..090c2ae --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# Stage 1: Build +FROM oven/bun:latest AS builder +WORKDIR /app +COPY . . +RUN bun install --frozen-lockfile +RUN bun run build + +# Stage 2: Production Runtime +FROM oven/bun:latest +WORKDIR /app +# Copy only necessary files from the builder +COPY --from=builder /app/build ./build +COPY --from=builder /app/package.json . + +ENV PORT=3167 +EXPOSE 3167 +USER bun +# Run the application from the build directory +CMD ["bun", "build/index.js"] \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index 8f834d4..2cfb9c4 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 21a2ea8..51474d7 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "@storybook/addon-vitest": "^10.2.0", "@storybook/sveltekit": "^10.2.0", "@sveltejs/adapter-auto": "^7.0.0", + "@sveltejs/adapter-node": "^5.5.4", "@sveltejs/kit": "^2.50.1", "@sveltejs/vite-plugin-svelte": "^6.2.4", "@tailwindcss/forms": "^0.5.11", @@ -44,6 +45,7 @@ "prettier-plugin-tailwindcss": "^0.7.2", "storybook": "^10.2.0", "svelte": "^5.48.0", + "svelte-adapter-bun": "^1.0.1", "svelte-check": "^4.3.5", "svelte-sonner": "^1.0.7", "tailwind-merge": "^3.4.0", diff --git a/svelte.config.js b/svelte.config.js index f18dfab..b084c6f 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,4 +1,4 @@ -import adapter from '@sveltejs/adapter-auto'; +import adapter from '@sveltejs/adapter-node'; import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; /** @type {import('@sveltejs/kit').Config} */