FROM oven/bun:1.2.8-debian

WORKDIR /app

COPY ./packages/core ./core

COPY ./packages/backend/package.json ./packages/backend/bun.lock ./backend/

RUN apt update && apt install -y curl

RUN ln -s /bin/uname /usr/bin/uname

RUN /bin/bash -c "$(curl -fsSL https://aliyuncli.alicdn.com/install.sh)"

WORKDIR backend

RUN bun install

COPY ./packages/backend/ .

RUN mkdir -p /app/logs

CMD ["bun", "start"]