Files
n8n-compose/Dockerfile.sql-executor
Claude Code 96d70d9edf fix: resolve MariaDB collation error by switching from mysql-connector to PyMySQL
- Replace mysql-connector-python with PyMySQL driver for better MariaDB compatibility
- PyMySQL handles utf8mb4_0900_ai_ci collation properly without errors
- Update Dockerfile.sql-executor to install PyMySQL and psycopg2-binary
- Refactor sql-query-executor.py to use PyMySQL API (pymysql.connect, DictCursor)
- Verified sql-executor service with SELECT, INSERT, UPDATE operations on Freescout DB
- Add n8n workflow definitions: workflow-a-http.json and workflow-b-http.json
  * Workflow A: Polls unprocessed conversations, analyzes with LiteLLM, saves suggestions
  * Workflow B: Polls approved suggestions, executes Baramundi jobs or email replies
- Update compose.yaml with sql-executor service configuration and dependencies

All SQL operations now execute successfully against MariaDB 11.3.2
2026-03-17 09:31:03 +01:00

20 lines
440 B
Docker

FROM python:3.11-slim
WORKDIR /app
# Install dependencies
RUN pip install --no-cache-dir flask PyMySQL psycopg2-binary
# Copy the SQL executor script
COPY scripts/sql-query-executor.py /app/app.py
# Expose port
EXPOSE 4000
# Health check
HEALTHCHECK --interval=10s --timeout=5s --retries=5 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:4000/health').read()"
# Run the app
CMD ["python", "app.py"]