feat(WP-0004): railiance deployment & service ops
- Dockerfile (multi-stage, uv-based, slim runtime)
- .dockerignore
- docker-compose.railiance.yml (Temporal + NATS + PG, no Elasticsearch)
- GET /health endpoint (db + temporal probes, 200/503)
- .env.example (complete env var reference)
- Makefile: migrate, sync-all, dev-up/down, railiance-up/down,
start-worker, start-api, start-event-router, help targets;
extracted sync-event-types Python to scripts/sync_event_types.py
- SIGTERM graceful shutdown in worker.py and event_router.py
- docs/runbook.md: Railiance deployment section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 00:04:39 +02:00
|
|
|
# Stage 1 — install Python deps
|
2026-09-27 13:50:16 +02:00
|
|
|
FROM python:3.12-slim@sha256:78387bc3881b8273120a12ebe6c1ab22b018ccc2c9adf565ae1ac9b536e184ea AS builder
|
|
|
|
|
RUN pip install uv==0.5.9 --no-cache-dir
|
feat(WP-0004): railiance deployment & service ops
- Dockerfile (multi-stage, uv-based, slim runtime)
- .dockerignore
- docker-compose.railiance.yml (Temporal + NATS + PG, no Elasticsearch)
- GET /health endpoint (db + temporal probes, 200/503)
- .env.example (complete env var reference)
- Makefile: migrate, sync-all, dev-up/down, railiance-up/down,
start-worker, start-api, start-event-router, help targets;
extracted sync-event-types Python to scripts/sync_event_types.py
- SIGTERM graceful shutdown in worker.py and event_router.py
- docs/runbook.md: Railiance deployment section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 00:04:39 +02:00
|
|
|
WORKDIR /app
|
|
|
|
|
COPY pyproject.toml uv.lock ./
|
|
|
|
|
COPY src/ ./src/
|
|
|
|
|
RUN uv sync --no-dev --frozen
|
|
|
|
|
|
2026-10-04 15:52:10 +02:00
|
|
|
# Repo Manager CLI for the bounded operation repo_manager_freshness
|
|
|
|
|
# (RMGR-WP-0020-T04, ACTIVITY-WP-0044). Isolated venv from repo-manager's own
|
|
|
|
|
# lock at the founder-reviewed commit; git verifies the commit identity. Git is
|
|
|
|
|
# needed only in this build stage and does not enter the runtime image.
|
|
|
|
|
ARG REPO_MANAGER_COMMIT=e77f8b457647ff23697e45a74615edde5f42d39d
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/* \
|
|
|
|
|
&& git init -q /opt/repo-manager \
|
|
|
|
|
&& git -C /opt/repo-manager fetch -q --depth 1 https://forgejo.coulomb.social/coulomb/repo-manager.git "${REPO_MANAGER_COMMIT}" \
|
|
|
|
|
&& git -C /opt/repo-manager checkout -q --detach FETCH_HEAD \
|
|
|
|
|
&& test "$(git -C /opt/repo-manager rev-parse HEAD)" = "${REPO_MANAGER_COMMIT}" \
|
|
|
|
|
&& cd /opt/repo-manager && uv sync --no-dev --frozen --no-editable \
|
|
|
|
|
&& /opt/repo-manager/.venv/bin/rmgr freshness run --help > /dev/null
|
|
|
|
|
|
2026-09-27 13:50:16 +02:00
|
|
|
# Isolated CI checks; development dependencies do not enter the runtime image.
|
|
|
|
|
FROM builder AS test
|
2026-09-27 17:05:49 +02:00
|
|
|
# Real-Git transport fixtures require Git only in the isolated test image.
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
|
2026-09-27 13:50:16 +02:00
|
|
|
COPY tests/ ./tests/
|
|
|
|
|
COPY Dockerfile ./Dockerfile
|
|
|
|
|
COPY .forgejo/workflows/image.yaml ./.forgejo/workflows/image.yaml
|
|
|
|
|
COPY schemas/ ./schemas/
|
|
|
|
|
COPY k8s/ ./k8s/
|
2026-10-19 15:09:27 +02:00
|
|
|
COPY scripts/render_gitops.py scripts/check_gitops_promotion.py scripts/verify_custodian_bundle.py ./scripts/
|
|
|
|
|
COPY activity-definitions/ ./activity-definitions/
|
|
|
|
|
RUN uv sync --frozen --extra dev && uv run --no-sync python scripts/render_gitops.py --check --verify-frontend --verify-platform && uv run --no-sync pytest -q -p no:cacheprovider tests/test_frontend_patterns.py tests/test_frontend_monthly_review.py tests/test_pqrst_monthly.py tests/test_repository_grant.py tests/test_instruction_evaluation.py tests/test_admin_sync_api.py tests/test_gitops_release.py tests/test_release_broker.py tests/test_release_transport.py tests/test_release_dispatch.py tests/test_custodian_bundle.py tests/test_custodian_inputs.py tests/test_custodian_operations.py
|
2026-09-27 13:50:16 +02:00
|
|
|
|
feat(WP-0004): railiance deployment & service ops
- Dockerfile (multi-stage, uv-based, slim runtime)
- .dockerignore
- docker-compose.railiance.yml (Temporal + NATS + PG, no Elasticsearch)
- GET /health endpoint (db + temporal probes, 200/503)
- .env.example (complete env var reference)
- Makefile: migrate, sync-all, dev-up/down, railiance-up/down,
start-worker, start-api, start-event-router, help targets;
extracted sync-event-types Python to scripts/sync_event_types.py
- SIGTERM graceful shutdown in worker.py and event_router.py
- docs/runbook.md: Railiance deployment section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 00:04:39 +02:00
|
|
|
# Stage 2 — runtime image
|
2026-09-27 13:50:16 +02:00
|
|
|
FROM python:3.12-slim@sha256:78387bc3881b8273120a12ebe6c1ab22b018ccc2c9adf565ae1ac9b536e184ea AS runtime
|
feat(WP-0004): railiance deployment & service ops
- Dockerfile (multi-stage, uv-based, slim runtime)
- .dockerignore
- docker-compose.railiance.yml (Temporal + NATS + PG, no Elasticsearch)
- GET /health endpoint (db + temporal probes, 200/503)
- .env.example (complete env var reference)
- Makefile: migrate, sync-all, dev-up/down, railiance-up/down,
start-worker, start-api, start-event-router, help targets;
extracted sync-event-types Python to scripts/sync_event_types.py
- SIGTERM graceful shutdown in worker.py and event_router.py
- docs/runbook.md: Railiance deployment section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 00:04:39 +02:00
|
|
|
WORKDIR /app
|
|
|
|
|
COPY --from=builder /app/.venv /app/.venv
|
|
|
|
|
COPY --from=builder /app/src /app/src
|
2026-10-04 15:52:10 +02:00
|
|
|
COPY --from=builder /opt/repo-manager/.venv /opt/repo-manager/.venv
|
2026-05-15 09:22:16 +02:00
|
|
|
COPY alembic.ini ./
|
|
|
|
|
COPY migrations/ ./migrations/
|
2026-05-22 13:49:46 +02:00
|
|
|
COPY scripts/ ./scripts/
|
2026-10-19 15:09:27 +02:00
|
|
|
# Pinned owner commands; local hash verification performs no network or execution.
|
|
|
|
|
COPY k8s/custodian-release/commands/ /opt/custodian-commands/
|
|
|
|
|
COPY k8s/custodian-release/input-policy.json /opt/custodian-input-policy.json
|
|
|
|
|
RUN python /app/scripts/verify_custodian_bundle.py --root /opt/custodian-commands
|
feat(WP-0004): railiance deployment & service ops
- Dockerfile (multi-stage, uv-based, slim runtime)
- .dockerignore
- docker-compose.railiance.yml (Temporal + NATS + PG, no Elasticsearch)
- GET /health endpoint (db + temporal probes, 200/503)
- .env.example (complete env var reference)
- Makefile: migrate, sync-all, dev-up/down, railiance-up/down,
start-worker, start-api, start-event-router, help targets;
extracted sync-event-types Python to scripts/sync_event_types.py
- SIGTERM graceful shutdown in worker.py and event_router.py
- docs/runbook.md: Railiance deployment section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 00:04:39 +02:00
|
|
|
COPY activity-definitions/ ./activity-definitions/
|
|
|
|
|
COPY event-types/ ./event-types/
|
|
|
|
|
COPY tasks/ ./tasks/
|
|
|
|
|
ENV PATH="/app/.venv/bin:$PATH"
|
|
|
|
|
ENV PYTHONPATH="/app/src"
|
2026-10-04 15:52:10 +02:00
|
|
|
ENV ACTIVITY_CORE_RMGR_BIN="/opt/repo-manager/.venv/bin/rmgr"
|
feat(WP-0004): railiance deployment & service ops
- Dockerfile (multi-stage, uv-based, slim runtime)
- .dockerignore
- docker-compose.railiance.yml (Temporal + NATS + PG, no Elasticsearch)
- GET /health endpoint (db + temporal probes, 200/503)
- .env.example (complete env var reference)
- Makefile: migrate, sync-all, dev-up/down, railiance-up/down,
start-worker, start-api, start-event-router, help targets;
extracted sync-event-types Python to scripts/sync_event_types.py
- SIGTERM graceful shutdown in worker.py and event_router.py
- docs/runbook.md: Railiance deployment section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 00:04:39 +02:00
|
|
|
CMD ["python", "-m", "activity_core.worker"]
|