Add dockerfile

This commit is contained in:
2025-08-05 13:38:02 +08:00
parent 88371d6509
commit 3f78eb1a32
5 changed files with 38 additions and 34 deletions

6
api/.dockerignore Normal file
View File

@@ -0,0 +1,6 @@
*
!package.json
!bun.lock
!tsconfig.json
!src/
!src/**

34
api/.gitignore vendored
View File

@@ -1,34 +0,0 @@
# dependencies (bun install)
node_modules
# output
out
dist
*.tgz
# code coverage
coverage
*.lcov
# logs
logs
_.log
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# caches
.eslintcache
.cache
*.tsbuildinfo
# IntelliJ based IDEs
.idea
# Finder (MacOS) folder config
.DS_Store

14
api/Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM oven/bun:1.2.19-alpine
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
EXPOSE 3000
CMD ["bun", "src/index.ts"]