diff --git a/ai_software_factory/Dockerfile b/ai_software_factory/Dockerfile deleted file mode 100644 index 4c21b5f..0000000 --- a/ai_software_factory/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -# AI Software Factory Dockerfile -FROM python:3.11-slim - -# Set environment variables -ENV PYTHONDONTWRITEBYTECODE=1 \ - PYTHONUNBUFFERED=1 \ - PIP_NO_CACHE_DIR=1 \ - PIP_DISABLE_PIP_VERSION_CHECK=1 - -# Set work directory -WORKDIR /app - -# Install system dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - curl \ - && rm -rf /var/lib/apt/lists/* - -# Install dependencies -COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt - -# Copy application code -COPY . . - -# Set up environment file if it exists, otherwise use .env.example -RUN if [ -f .env ]; then \ - cat .env; \ - elif [ -f .env.example ]; then \ - cp .env.example .env; \ - fi - -# Initialize database tables (use SQLite by default, can be overridden by DB_POOL_SIZE env var) -RUN python database.py || true - -# Expose port -EXPOSE 8000 - -# Health check -HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD curl -f http://localhost:8000/health || exit 1 - -# Run application -CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] \ No newline at end of file diff --git a/ai_software_factory/docker-compose.yml b/ai_software_factory/docker-compose.yml deleted file mode 100644 index 8a2c962..0000000 --- a/ai_software_factory/docker-compose.yml +++ /dev/null @@ -1,88 +0,0 @@ -version: '3.8' - -services: - ai-software-factory: - build: - context: . - dockerfile: Containerfile - ports: - - "8000:8000" - environment: - - HOST=0.0.0.0 - - PORT=8000 - - OLLAMA_URL=http://ollama:11434 - - OLLAMA_MODEL=llama3 - - GITEA_URL=${GITEA_URL:-https://gitea.yourserver.com} - - GITEA_TOKEN=${GITEA_TOKEN:-} - - GITEA_OWNER=${GITEA_OWNER:-ai-test} - - GITEA_REPO=${GITEA_REPO:-ai-test} - - N8N_WEBHOOK_URL=${N8N_WEBHOOK_URL:-} - - N8N_API_URL=${N8N_API_URL:-} - - N8N_USER=${N8N_USER:-} - - N8N_PASSWORD=${N8N_PASSWORD:-} - - TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN:-} - - TELEGRAM_CHAT_ID=${TELEGRAM_CHAT_ID:-} - - POSTGRES_HOST=postgres - - POSTGRES_PORT=5432 - - POSTGRES_USER=${POSTGRES_USER:-ai_software_factory} - - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-} - - POSTGRES_DB=${POSTGRES_DB:-ai_software_factory} - - LOG_LEVEL=${LOG_LEVEL:-INFO} - - DB_POOL_SIZE=${DB_POOL_SIZE:-10} - - DB_MAX_OVERFLOW=${DB_MAX_OVERFLOW:-20} - - DB_POOL_RECYCLE=${DB_POOL_RECYCLE:-3600} - - DB_POOL_TIMEOUT=${DB_POOL_TIMEOUT:-30} - depends_on: - - postgres - networks: - - ai-test-network - - postgres: - image: postgres:15-alpine - environment: - - POSTGRES_USER=${POSTGRES_USER:-ai_software_factory} - - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-} - - POSTGRES_DB=${POSTGRES_DB:-ai_software_factory} - volumes: - - postgres_data:/var/lib/postgresql/data - ports: - - "5432:5432" - networks: - - ai-test-network - # Health check for PostgreSQL - healthcheck: - test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-ai_software_factory} -d ${POSTGRES_DB:-ai_software_factory}"] - interval: 10s - timeout: 5s - retries: 5 - - n8n: - image: n8nio/n8n:latest - ports: - - "5678:5678" - environment: - - N8N_HOST=n8n - - N8N_PORT=5678 - - N8N_PROTOCOL=http - volumes: - - n8n_data:/home/node/.n8n - networks: - - ai-test-network - - ollama: - image: ollama/ollama:latest - ports: - - "11434:11434" - volumes: - - ollama_data:/root/.ollama - networks: - - ai-test-network - -volumes: - postgres_data: - n8n_data: - ollama_data: - -networks: - ai-test-network: - driver: bridge diff --git a/ai_software_factory/main.py b/ai_software_factory/main.py index ae7e808..7a0f81e 100644 --- a/ai_software_factory/main.py +++ b/ai_software_factory/main.py @@ -15,7 +15,6 @@ from agents.database_manager import DatabaseManager from config import settings from datetime import datetime import json -from jinja2 import Template app = FastAPI( title="AI Software Factory", diff --git a/ai_software_factory/requirements.txt b/ai_software_factory/requirements.txt index 473407f..437e03e 100644 --- a/ai_software_factory/requirements.txt +++ b/ai_software_factory/requirements.txt @@ -15,3 +15,4 @@ isort==5.13.2 flake8==6.1.0 mypy==1.7.1 httpx==0.25.2 +jinja2==3.1.3 \ No newline at end of file