Commit 8319502e authored by Bot's avatar Bot

feat: thêm Dockerfile và docker-compose với hot reload, cập nhật requirements.txt

parent 034a6a94
__pycache__
*.pyc
*.pyo
*.pyd
.Python
*.so
*.egg
*.egg-info
dist
build
.git
.gitignore
.env
.venv
venv/
ENV/
env/
*.log
.DS_Store
.vscode
.idea
*.swp
*.swo
*~
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port
EXPOSE 5002
# Run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5002", "--reload"]
version: '3.8'
services:
app:
build: .
container_name: tool-test-chatbot-canifa
ports:
- "5002:5002"
volumes:
# Mount code for hot reload
- .:/app
# Exclude node_modules and other unnecessary files
- /app/__pycache__
- /app/.git
environment:
- TOOL_PORT=5002
- CHATBOT_API_URL=${CHATBOT_API_URL:-http://localhost:8000}
- CHATBOT_API_ENDPOINT=${CHATBOT_API_ENDPOINT:-/api/agent/chat}
- MAX_CONCURRENT_REQUESTS=${MAX_CONCURRENT_REQUESTS:-5}
- REQUEST_TIMEOUT=${REQUEST_TIMEOUT:-60}
env_file:
- .env
restart: unless-stopped
command: uvicorn app:app --host 0.0.0.0 --port 5002 --reload
fastapi==0.104.1
uvicorn[standard]==0.24.0
python-dotenv==1.0.0
httpx==0.25.2
pandas==2.1.4
openpyxl==3.1.2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment