FROM oven/bun:1-alpine

WORKDIR /app/src/components/microservices/baidu-netdisk
COPY src/components/microservices/baidu-netdisk/package.json ./package.json
COPY src/components/microservices/baidu-netdisk/bun.lock ./bun.lock
RUN bun install --production --frozen-lockfile
COPY src/components/microservices/baidu-netdisk/tsconfig.json ./tsconfig.json
COPY src/components/shared /app/src/components/shared
COPY src/components/microservices/baidu-netdisk/src ./src

EXPOSE 4244
CMD ["bun", "run", "src/index.ts"]
