fix: add trailing slashes to agent work orders endpoints

- add trailing slashes to prevent FastAPI mount() 307 redirects
- add defensive null check for repository_url in detail view
- fixes ERR_NAME_NOT_RESOLVED when browser follows redirect to archon-server
This commit is contained in:
Rasmus Widing
2025-10-17 09:53:53 +03:00
parent edf3a51fa5
commit 8f3e8bc220
23 changed files with 89 additions and 61 deletions

View File

@@ -13,9 +13,10 @@ RUN apt-get update && apt-get install -y \
COPY pyproject.toml .
# Install server dependencies to a virtual environment using uv
# Install base dependencies (includes structlog) and server groups
RUN uv venv /venv && \
. /venv/bin/activate && \
uv pip install --group server --group server-reranking
uv pip install . --group server --group server-reranking
# Runtime stage
FROM python:3.12-slim
@@ -56,8 +57,9 @@ ENV PATH=/venv/bin:$PATH
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
RUN playwright install chromium
# Copy server code and tests
# Copy server code, agent work orders, and tests
COPY src/server/ src/server/
COPY src/agent_work_orders/ src/agent_work_orders/
COPY src/__init__.py src/
COPY tests/ tests/
@@ -76,4 +78,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD sh -c "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:${ARCHON_SERVER_PORT}/health')\""
# Run the Server service
CMD sh -c "python -m uvicorn src.server.main:socket_app --host 0.0.0.0 --port ${ARCHON_SERVER_PORT} --workers 1"
CMD sh -c "python -m uvicorn src.server.main:app --host 0.0.0.0 --port ${ARCHON_SERVER_PORT} --workers 1"