build(api): refresh bun config
This commit is contained in:
@@ -1,20 +1,17 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
# ARG NODE_VERSION=20-alpine
|
||||
ARG BUN_VERSION=1.0.0
|
||||
|
||||
# FROM node:${NODE_VERSION} AS base
|
||||
FROM oven/bun:latest AS base
|
||||
FROM oven/bun:${BUN_VERSION} AS base
|
||||
WORKDIR /app
|
||||
|
||||
FROM base AS deps
|
||||
COPY package.json ./
|
||||
# Install only production dependencies for the runtime image
|
||||
RUN bun install --omit=dev
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --production --no-cache
|
||||
|
||||
FROM base AS build
|
||||
COPY package.json ./
|
||||
# Install all dependencies for building (includes devDeps like typescript)
|
||||
RUN bun install
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --no-cache
|
||||
COPY tsconfig.json ./
|
||||
COPY src ./src
|
||||
RUN bun run build
|
||||
@@ -23,8 +20,8 @@ FROM base AS runner
|
||||
ENV NODE_ENV=production
|
||||
USER bun
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY --link --from=deps /app/node_modules ./node_modules
|
||||
COPY --link --from=build /app/dist ./dist
|
||||
COPY package.json ./
|
||||
COPY --from=build /app/dist ./dist
|
||||
EXPOSE 3000
|
||||
CMD ["bun", "dist/app.js"]
|
||||
CMD ["bun", "run", "dist/app.js"]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
5139
s3-nodejs-api/package-lock.json
generated
Normal file
5139
s3-nodejs-api/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -4,27 +4,26 @@
|
||||
"description": "A simple application to stream audio files stored in S3.",
|
||||
"main": "dist/app.js",
|
||||
"scripts": {
|
||||
"start": "bun dist/app.js",
|
||||
"start:dev": "ts-node src/app.ts",
|
||||
"build": "tsc -p tsconfig.json",
|
||||
"test": "jest"
|
||||
"start": "bun run dist/app.js",
|
||||
"start:dev": "bun run --watch src/app.ts",
|
||||
"build": "bun run build:tsc",
|
||||
"build:tsc": "tsc -p tsconfig.json",
|
||||
"test": "bun test"
|
||||
},
|
||||
"dependencies": {
|
||||
"aws-sdk": "^2.1234.0",
|
||||
"express": "^4.17.1",
|
||||
"morgan": "^1.10.0"
|
||||
"@aws-sdk/client-s3": "^3.879.0",
|
||||
"express": "^4.18.2",
|
||||
"pino": "^9.9.0",
|
||||
"pino-http": "^10.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/aws-sdk": "^2.7.0",
|
||||
"@types/express": "^4.17.0",
|
||||
"@types/jest": "^26.0.0",
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^20.11.0",
|
||||
"jest": "^26.6.0",
|
||||
"ts-jest": "^26.5.0",
|
||||
"ts-node": "^9.1.1",
|
||||
"typescript": "^4.1.3"
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,9 @@
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src"
|
||||
"rootDir": "./src",
|
||||
"typeRoots": ["./src/types", "./node_modules/@types"]
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["node_modules", "**/*.spec.ts"]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user