File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ # Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+ # Stage 1: Build the TypeScript project
3+ FROM node:18-alpine AS builder
4+
5+ # Set working directory
6+ WORKDIR /app
7+
8+ # Copy package files and install dependencies
9+ COPY package.json package-lock.json ./
10+ RUN npm install
11+
12+ # Copy source files
13+ COPY src ./src
14+ COPY tsconfig.json ./
15+
16+ # Build the project
17+ RUN npm run build
18+
19+ # Stage 2: Set up the runtime environment
20+ FROM node:18-alpine
21+
22+ # Set working directory
23+ WORKDIR /app
24+
25+ # Copy only the necessary files from the build stage
26+ COPY --from=builder /app/dist ./dist
27+ COPY package.json package-lock.json ./
28+
29+ # Install production dependencies only
30+ RUN npm ci --omit=dev
31+
32+ # Expose any necessary ports (example: 3000)
33+ EXPOSE 3000
34+
35+ # Set the environment variable for the Apify token
36+ ENV APIFY_TOKEN=<your-apify-token>
37+
38+ # Set the entry point for the container
39+ ENTRYPOINT ["node" , "dist/main.js" ]
You can’t perform that action at this time.
0 commit comments