Skip to content

Commit

Permalink
Update Dockerfile to include prisma schema and generate prisma client
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Jan 2, 2024
1 parent e22f6a0 commit 8dcbbc0
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ WORKDIR /opt/lavamusic/
COPY package*.json ./
RUN apt-get update && \
apt-get install -y openssl && \
npm install && \
npx prisma generate

npm install
# Copy source code
COPY . .

# Copy prisma schema
COPY prisma ./prisma

# Generate prisma client
RUN npx prisma generate

# Build TypeScript
RUN npm run build

Expand All @@ -32,7 +36,9 @@ COPY --from=builder /opt/lavamusic/prisma ./prisma
COPY package*.json ./
RUN apt-get update && \
apt-get install -y openssl && \
npm install --only=production && \
npx prisma generate
npm install --only=production

# Generate prisma client
RUN npx prisma generate

CMD [ "node", "dist/index.js" ]

0 comments on commit 8dcbbc0

Please sign in to comment.