-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 867 Bytes
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 867 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
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Create virtual environment using Python's built-in venv
# This isolates dependencies from the system Python
RUN python -m venv /app/.venv
# Set environment variables to use the venv
ENV PATH="/app/.venv/bin:$PATH"
ENV VIRTUAL_ENV="/app/.venv"
ENV PYTHONUNBUFFERED=1
# Copy dependency files
COPY requirements.txt .
COPY pyproject.toml .
COPY setup.py .
COPY README.md .
# Install dependencies in the virtual environment
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY chatrixcd/ ./chatrixcd/
# Install the application in the venv
RUN pip install --no-cache-dir -e .
# Create store directory
RUN mkdir -p /app/store
# Note: Configuration should be provided via mounted config.json file
# Example: -v ./config.json:/app/config.json:ro
# Run the bot
CMD ["chatrixcd"]