Repository navigation
build: declare dependencies, add a container image, fix reference URLs - #11
Merged
Merged
Conversation
Base automatically changed from
thomashowe/con-1082-webhook-fail-closed
to
main
September 25, 2026 21:49
vcon was installed from git in CI (.github/workflows/tests.yml) and not declared anywhere else, so `pip install .` never worked. Pin it to the released PyPI package (>=0.9.4, verified as the vcon-dev library by its import path: `from vcon import Vcon`, `vcon.dialog`, `vcon.party`). boto3 (core/media_publisher.py S3Publisher) becomes an optional `[s3]` extra since most deployments don't use MEDIA_BACKEND=s3. cryptography (Telnyx Ed25519 signature verification) becomes a main dependency so signature validation isn't silently skipped when it happens to be missing. CI now installs from pyproject.toml alone, no git install. requirements.txt points at the package instead of duplicating the dependency list. uv.lock regenerated with `uv lock`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…edia URL
In reference mode (no download, no publisher) the base builder's default
_reference_url appends `.{format}` to the recording URL, because Twilio's
recording URI is extension-less by design. Bandwidth's mediaUrl
(`.../recordings/{id}/media`), FreeSWITCH's recording_url/recording_file,
and Asterisk's target_uri are already complete, extension-carrying
endpoints, so the same default corrupts them into a URL the platform does
not serve. Telnyx already overrode this for the same reason (pre-signed,
per-format URLs); this applies the same override to Bandwidth, FreeSWITCH
and Asterisk.
Adds a Bandwidth test asserting the reference-mode dialog URL is emitted
unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was no Dockerfile, compose file, or systemd unit; deployment was `python main.py <adapter>` by hand. Adds one slim, non-root Dockerfile that takes the adapter name as its command (ENTRYPOINT python main.py, default CMD twilio), with a HEALTHCHECK against GET /health on PORT (default 8080, confirmed from core/base_config.py and each adapter's webhook.py). .dockerignore keeps .env, venvs, caches and .git out of the build context. compose.example.yaml shows running one or more adapters with env_file pointing at a .env. Updates README Installation/Requirements (stale git+vcon-lib install instructions, now a declared dependency) and Deployment sections to match; left the per-adapter config tables untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a workflow triggered only by v* tag pushes that builds the Dockerfile and pushes ghcr.io/<repo> using the built-in GITHUB_TOKEN (packages: write). Not triggered as part of this change; no tag is pushed here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
howethomas
force-pushed
the
thomashowe/con-1084-packaging-container
branch
from
September 25, 2026 21:49
1426a5c to
b19f0f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #10. Base is that branch, so this diff shows only this change. Merge #10 first; GitHub retargets this to
mainwhen that branch is deleted.The package could not be installed or deployed cleanly:
vconwas never declared, CI pulled vcon-lib from git, and there was no container image.Changes
vcon>=0.9.4from PyPI (locks to 0.9.5) andcryptographyare runtime dependencies.boto3is an optionals3extra, since onlyMEDIA_BACKEND=s3imports it.requirements.txtnow defers topyproject.toml.pyproject.tomlalone (pip install -e ".[dev,s3]"), no git installs.python:3.12-slim, non-root user, adapter name as the command (docker run <image> twilio),HEALTHCHECKon/health..dockerignorekeeps.env, venvs and caches out of the image.compose.example.yamlshows one service per adapter.ghcr.io/<repo>onv*tags only, withGITHUB_TOKEN..wav/.mp3to the provider URL. Bandwidth'smediaUrlhas no extension, and Asterisk and FreeSWITCH URLs already carry one, so all three produced URLs that do not resolve. Each now passes the provider URL through unchanged. Twilio's appended format is correct and unchanged.Verification
pip install -e ".[dev,s3]", no git installs: 524 passed (on top of fix(webhooks): fail closed when signature validation is misconfigured #10).docker buildsucceeded;docker run ... twilioserved{"status":"healthy"}on/healthand the container healthcheck reported healthy.ruff checkandblack --checkclean.Known nit
The Dockerfile purges
build-essentialin a later layer than it installed it in, so the image does not actually shrink. The build tools are probably unnecessary sincecryptographyships wheels. Cosmetic; can follow up.Refs CON-1084
🤖 Generated with Claude Code