Skip to content

Commit 786ad4a

Browse files
authored
fix: possible fix for deployment issues (#57)
As seen on the prisma website, this error may arise when using bun without nodejs installed.
1 parent 4c6a5a5 commit 786ad4a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22
FROM oven/bun:latest as base
33
WORKDIR /usr/src/app
44

5+
# install nodejs and npm
6+
RUN apt-get update
7+
RUN echo "y" | apt-get install curl
8+
# nvm env vars
9+
RUN mkdir -p /usr/local/nvm
10+
ENV NVM_DIR /usr/local/nvm
11+
# set the exact version
12+
ENV NODE_VERSION v20.11.1
13+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
14+
RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use --delete-prefix $NODE_VERSION"
15+
# add node and npm to the PATH
16+
ENV NODE_PATH $NVM_DIR/versions/node/$NODE_VERSION/bin
17+
ENV PATH $NODE_PATH:$PATH
18+
519
# set environment variables
620
ENV RATE_LIMIT="200"
721
ENV DATABASE_URL="file:./database/data.db"

0 commit comments

Comments
 (0)