diff --git a/Dockerfile b/Dockerfile index a84520e..81eddda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,15 @@ 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 +# Install build dependencies for node-gyp +RUN apk add --no-cache python3 make g++ + +# Set environment variable for node-gyp to find Python +ENV PYTHON=/usr/bin/python3 # Create working directory WORKDIR /opt/app -# Copy dependency files first (for layer caching) +# Copy dependency files COPY package*.json ./ COPY babel.config.js tsconfig.json ./ COPY .env ./ @@ -15,14 +17,12 @@ COPY .env ./ # Install dependencies RUN npm install -# Copy application source +# Copy source COPY src ./src # Build project RUN npm run build -# Expose port EXPOSE 3000 -# Start app CMD ["npm", "start"]