-
Notifications
You must be signed in to change notification settings - Fork 174
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (28 loc) · 785 Bytes
/
Dockerfile
File metadata and controls
38 lines (28 loc) · 785 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
# Use Node.js LTS version
FROM node:20-alpine
# Install curl
RUN apk add --no-cache curl
# Set the working directory
WORKDIR /app
# Copy package files
COPY package.json bun.lock* package-lock.json* ./
# Install all dependencies (needed for build)
RUN npm ci
# Copy source code
COPY . .
# Build arguments for environment variables
ARG AIRTABLE_API_KEY=""
ARG AIRTABLE_BASE_ID=""
ARG AIRTABLE_EMAILS_TABLE=""
ARG GEOCODER_API_KEY=""
# Set environment variables from build args
ENV AIRTABLE_API_KEY=$AIRTABLE_API_KEY
ENV AIRTABLE_BASE_ID=$AIRTABLE_BASE_ID
ENV AIRTABLE_EMAILS_TABLE=$AIRTABLE_EMAILS_TABLE
ENV GEOCODER_API_KEY=$GEOCODER_API_KEY
# Build the application
RUN npm run build
# Expose the port the app runs on
EXPOSE 3000
# Start the application
CMD ["node", "build"]