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