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
This commit is contained in:
27
compose.yaml
27
compose.yaml
@@ -134,6 +134,33 @@ services:
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
sql-executor:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.sql-executor
|
||||
restart: always
|
||||
ports:
|
||||
- "4000:4000"
|
||||
environment:
|
||||
- FREESCOUT_DB_HOST=10.136.40.104
|
||||
- FREESCOUT_DB_PORT=3306
|
||||
- FREESCOUT_DB_USER=freescout
|
||||
- FREESCOUT_DB_PASSWORD=5N6fv4wIgsI6BZV
|
||||
- FREESCOUT_DB_NAME=freescout
|
||||
- POSTGRES_HOST=postgres
|
||||
- POSTGRES_PORT=5432
|
||||
- POSTGRES_USER=kb_user
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- POSTGRES_DB=n8n_kb
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
n8n_data:
|
||||
traefik_data:
|
||||
|
||||
Reference in New Issue
Block a user