Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]