feat(dwg): DWG→DXF via sidecar microservice (libredwg)

Add dedicated dwg2dxf container (Debian slim + libredwg-tools + Flask)
instead of modifying the Alpine base image. The ArchiTools API route
proxies to the sidecar over Docker internal network.

- dwg2dxf-api/: Dockerfile + Flask app (POST /convert, GET /health)
- docker-compose.yml: dwg2dxf service, healthcheck, depends_on
- route.ts: rewritten from local exec to HTTP proxy
- .dockerignore: exclude sidecar from main build context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-09 10:51:27 +02:00
parent 7ed653eaec
commit 5209fd5dd0
6 changed files with 161 additions and 36 deletions
+22
View File
@@ -0,0 +1,22 @@
FROM debian:bookworm-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3 python3-pip libredwg-tools && \
pip3 install --no-cache-dir --break-system-packages flask && \
apt-get purge -y python3-pip && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY app.py .
RUN useradd --system --no-create-home converter
USER converter
EXPOSE 5001
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:5001/health')" || exit 1
CMD ["python3", "app.py"]