Skip to content

Deployment

qrtransfer is a local-network tool by design: it binds a server on your machine and hands out a scannable URL. "Deployment" here means running it for longer sessions or in automated contexts. (For the documentation site deployment, see Documentation site below.)

Long-running sessions

The interactive stop prompt (Press Enter or Ctrl+C) keeps the session alive, so you can leave a transfer running in a terminal. To detach it:

nohup qrtransfer --keep-alive assets/ > transfer.log 2>&1 &

Or run it inside tmux/screen and detach. Remember that a session also stays up with --expire SECONDS (the link then dies on its own after SECONDS).

Docker

A Dockerfile is included: a multi-stage build that installs the package and its runtime dependencies into a slim Python 3.12 image and runs qrtransfer as the entry point under an unprivileged user.

Build it from source:

docker build -t qrtransfer .
docker run --rm --network host qrtransfer /data/myfile.pdf

A prebuilt image is published to the GitHub Container Registry by the .github/workflows/container.yml workflow on pushes to main and version tags:

docker pull ghcr.io/rkriad585/qrtransfer:latest
docker run --rm --network host ghcr.io/rkriad585/qrtransfer /data/myfile.pdf

Image tags generated: latest (default branch only), semantic versions from git tags (0.1.0, 0.1, 0), and the commit SHA.

Notes:

  • The container must share the host network (--network host) so the printed IP and port refer to the host. Port mapping (-p) works for a fixed --port.
  • The QR code and URL are printed to the container logs; capture them with docker logs.

Accessing from outside your LAN

The tool intentionally has no public relay — files never leave your network unless you deliberately forward a port on your router. If you want remote access you must set up port forwarding yourself, which is outside this project's scope. Prefer --password (and ideally --tls) if you do.

Documentation site

The docs are built with MkDocs (Material theme) and deployed automatically to GitHub Pages at https://rkriad585.github.io/qrtransfer/ by the .github/workflows/docs.yml workflow.

The workflow:

  1. triggers on pushes to main that touch docs/, README.md, mkdocs.yml, pyproject.toml, or the workflow itself (and on manual workflow_dispatch);
  2. installs .[docs] and runs mkdocs build (output directory: site/);
  3. uploads site/ as a Pages artifact and deploys with actions/deploy-pages.

The generated site's URL is attached to the GitHub Pages environment for the repository. To build and preview locally:

pip install -e ".[docs]"
mkdocs serve     # http://127.0.0.1:8000
mkdocs build     # writes ./site

Back to README