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,19 +1,21 @@
{ {
"dependencies": { "main": "src/main.ts",
"@clerk/express": "^1.7.4", "dependencies": {
"@libsql/client": "^0.15.9", "@clerk/express": "^1.7.4",
"@types/express": "^5.0.1", "@libsql/client": "^0.15.9",
"cors": "^2.8.5", "@types/express": "^5.0.1",
"dotenv": "^16.5.0", "cors": "^2.8.5",
"drizzle-orm": "^0.44.2", "dotenv": "^16.5.0",
"express": "^5.1.0", "drizzle-orm": "^0.44.2",
"socket.io": "^4.8.1" "express": "^5.1.0",
}, "socket.io": "^4.8.1"
"scripts": { },
"dev": "bun run --watch src/main.ts" "scripts": {
}, "dev": "bun run --watch src/main.ts",
"devDependencies": { "build": "bun build src/main.ts --outdir ./dist --target bun"
"drizzle-kit": "^0.31.1", },
"tsx": "^4.20.3" "devDependencies": {
} "drizzle-kit": "^0.31.1",
"tsx": "^4.20.3"
}
} }