-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (27 loc) · 927 Bytes
/
Dockerfile
File metadata and controls
39 lines (27 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Start with a Node.js image
FROM node:16-alpine AS builder
# Create and change to the app directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package.json ./
# Install dependencies without running scripts
RUN npm install --ignore-scripts
# Copy the rest of the application code
COPY . .
# Build the TypeScript code
RUN npm run build
# Final stage: use a minimal Node.js runtime
FROM node:16-alpine
# Set the working directory in the container
WORKDIR /app
# Copy compiled JavaScript files from the builder
COPY --from=builder /app/dist /app/dist
# Copy package.json to the container
COPY package.json .
# Set environment variable for the API key
ENV ALPHA_VANTAGE_API_KEY=your_api_key_here
# Install only production dependencies
RUN npm ci --omit=dev
# Start the application
ENTRYPOINT ["node", "dist/index.js"]