dockerfile backend wip
Some checks failed
Deploy to GitHub Pages / build (push) Has been cancelled
Deploy to GitHub Pages / deploy (push) Has been cancelled
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:
1
backend/.gitignore
vendored
1
backend/.gitignore
vendored
@@ -2,3 +2,4 @@ node_modules
|
||||
local.db
|
||||
drizzle
|
||||
bun.lockb
|
||||
dist
|
||||
|
||||
23
backend/Dockerfile
Normal file
23
backend/Dockerfile
Normal 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"]
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user