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:
@@ -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"]
|
||||
Reference in New Issue
Block a user