From f7af43a88b64111fa0e3e505ebfcb16562ec1909 Mon Sep 17 00:00:00 2001 From: Emmo00 Date: Tue, 11 Nov 2025 15:42:34 +0100 Subject: [PATCH] refactor: add python install to Dockerfile --- Dockerfile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5f70f92..a84520e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,28 @@ FROM node:20-alpine +# Install build dependencies required by node-gyp +RUN apk add --no-cache python3 make g++ \ + && npm config set python /usr/bin/python3 + # Create working directory WORKDIR /opt/app -# Copy and install dependencies -COPY package.json . -COPY package-lock.json . -COPY babel.config.js . -COPY tsconfig.json . -COPY .env . -COPY src ./src +# Copy dependency files first (for layer caching) +COPY package*.json ./ +COPY babel.config.js tsconfig.json ./ +COPY .env ./ + +# Install dependencies RUN npm install +# Copy application source +COPY src ./src + # Build project RUN npm run build -# Expose application port +# Expose port EXPOSE 3000 # Start app -CMD [ "npm", "start"] +CMD ["npm", "start"]