Skip to content

Commit

Permalink
fixed docker
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Feb 17, 2024
1 parent d955578 commit d4a7a55
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build TypeScript
FROM node:18 as builder
FROM node:20 as builder

WORKDIR /opt/lavamusic/

Expand All @@ -15,7 +15,7 @@ COPY . .
RUN npm run build

# Stage 2: Create production image
FROM node:18-slim
FROM node:20-slim

ENV NODE_ENV production

Expand All @@ -26,11 +26,8 @@ COPY --from=builder /opt/lavamusic/dist ./dist
COPY --from=builder /opt/lavamusic/src/utils/LavaLogo.txt ./src/utils/LavaLogo.txt
COPY --from=builder /opt/lavamusic/database/lavamusic.db ./database/lavamusic.db

# Copy package files and install dependencies
# Copy package files and install production dependencies
COPY package*.json ./
RUN apt-get update && \
apt-get install -y && \
npm install --only=production

RUN npm install --only=production

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

0 comments on commit d4a7a55

Please sign in to comment.