Skip to content
Open
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
21 changes: 19 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
FROM node:22-alpine

# Set working directory
WORKDIR /app

# Copy package files
COPY package*.json ./
RUN npm ci --ignore-scripts

# Install dependencies
# Use npm ci if lock file exists, else fallback to npm install
RUN if [ -f package-lock.json ]; then npm ci --ignore-scripts; else npm install --ignore-scripts; fi

# Copy rest of the project
COPY tsconfig.json ./
COPY src/ ./src/

# Build the project
RUN npm run build

# Expose app port
EXPOSE 3000

# Set production environment
ENV NODE_ENV=production

# Set entrypoint and default command
ENTRYPOINT ["node", "build/main/main/cli.js"]
CMD ["http"]
CMD ["http"]