[INFRA-AI-08] Moderation Service Containerization and :11438 Network Port Allocation

Infrastructure / MLOps

Published

October 14, 2026

NoteTask Brief
  • Repository / Component: ai_profanity_filter.
  • Stack: Docker, Docker Compose, Ollama (Qwen).
  • Task Type: DevOps / Infra.
  • Status: Ready for Implementation

Task Description

It is necessary to isolate the execution environment of the content filtering microservice into a Docker container, eliminate port conflicts within the shared AI network topology, and bind it to a dedicated port 11438.

Step-by-Step Instructions

  1. Locking the Network Configuration: In the uvicorn.run server launch parameters, configure the service to listen on port 11438 for incoming requests originating from the main Go backend.
  2. Dockerfile Development: Build a minimalist image based on the official python:3.10-slim image. Set up the copying of the source code, the ai-profanity-filter logger settings, and dependency installations.
  3. Registration in Docker Compose: Add the ai-profanity-filter service to the shared architectural orchestration file. Configure the external port mapping to 11438:11438. Connect the calls to the main ollama-core engine using network aliases.
  4. Shared Model Volume Utilization: Since this service, like the speech text parser, utilizes the shared qwen2.5:3b model, ensure that the container points to the same mounted Docker Volume where the model was initially loaded to avoid redundant disk space consumption.