fix docker file

This commit is contained in:
Rizky 2024-01-20 06:21:54 +07:00
parent 813d67aa54
commit 84498aee50
1 changed files with 3 additions and 11 deletions

View File

@ -9,24 +9,16 @@ ARG NODE_VERSION=18
RUN apt-get update
RUN apt-get install -y curl unzip
RUN curl -fsSL https://bun.sh/install | bash -s "bun-v1.0.18" &&
ln -s $HOME/.bun/bin/bun /usr/local/bin/bun
RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n &&
bash n $NODE_VERSION &&
rm n &&
npm install -g n
RUN curl -fsSL https://bun.sh/install | bash -s "bun-v1.0.18"
RUN ln -s $HOME/.bun/bin/bun /usr/local/bin/bun
RUN npm install -g pm2
# copy env for prisma
COPY app/db/.env-prod app/db/.env
# install dependency
RUN bun --version
RUN bun install
RUN bun run build
# prisma generate and db pull
RUN cd app/db && bun prisma db pull && bun prisma generate
EXPOSE 3000