dockerfile backend wip
Some checks failed
Deploy to GitHub Pages / build (push) Has been cancelled
Deploy to GitHub Pages / deploy (push) Has been cancelled

This commit is contained in:
2025-09-05 18:42:58 +02:00
parent 2d90bcdf79
commit b338468043
3 changed files with 44 additions and 18 deletions

1
backend/.gitignore vendored
View File

@@ -2,3 +2,4 @@ node_modules
local.db local.db
drizzle drizzle
bun.lockb bun.lockb
dist

23
backend/Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM oven/bun:latest AS build
WORKDIR /app
COPY package.json ./
COPY bun.lock ./
RUN bun install
COPY src ./src
RUN ls && bun run build
FROM oven/bun:latest AS run
WORKDIR /app
COPY --from=build /app/dist/ .
EXPOSE 3000
CMD ["bun", "run", "main.js"]

View File

@@ -1,4 +1,5 @@
{ {
"main": "src/main.ts",
"dependencies": { "dependencies": {
"@clerk/express": "^1.7.4", "@clerk/express": "^1.7.4",
"@libsql/client": "^0.15.9", "@libsql/client": "^0.15.9",
@@ -10,7 +11,8 @@
"socket.io": "^4.8.1" "socket.io": "^4.8.1"
}, },
"scripts": { "scripts": {
"dev": "bun run --watch src/main.ts" "dev": "bun run --watch src/main.ts",
"build": "bun build src/main.ts --outdir ./dist --target bun"
}, },
"devDependencies": { "devDependencies": {
"drizzle-kit": "^0.31.1", "drizzle-kit": "^0.31.1",