-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (30 loc) · 896 Bytes
/
Dockerfile
File metadata and controls
38 lines (30 loc) · 896 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 a multi-stage build to build the frontend
# Stage 1: Build the frontend
FROM node:16 as frontend-builder
WORKDIR /app
# Copy the frontend application to /app
COPY web/ /app/web/
# Install dependencies and build your application
WORKDIR /app/web
RUN npm install
RUN npm run build
# Stage 2: Set up the Python environment
FROM python:3.11-slim
WORKDIR /app
# Copy the Python requirements and install them
COPY mypy-requirements.txt .
COPY .env .
COPY utils utils/
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r mypy-requirements.txt
# Copy the necessary directories to the Docker image
COPY ai ai/
COPY bot bot/
COPY db db/
COPY utils utils/
# Copy the main application file
COPY app.py .
# Copy the built frontend assets from the frontend-builder stage
COPY --from=frontend-builder /app/web/build /app/web/build
# The command to run the app
CMD ["python", "app.py"]