Skip to main content

enlace_docker

Docker / docker-compose backend strategies for enlace.

Installing this package adds four new mode values to app.toml:

Mode What enlace does
docker Build the app's Dockerfile, run the container, supervise, route HTTP to it
image Pull a pre-built image, run it, supervise, route HTTP to it (no build step)
compose docker compose up -d the app's stack, route HTTP to a declared service+port, down on shutdown
docker_attached Route HTTP to an already-running container by name (no lifecycle management)

No code change in enlace is needed — enlace_docker registers via the enlace.backend_strategies entry-point group. Installing the package is enough.

Status

Scope: dev orchestration only. Production runs docker compose up out of band; enlace routes to it via the built-in mode=external. This package covers enlace serve / enlace dev. See enlace#3 for the design.

Install

pip install enlace_docker

Requires the docker CLI on PATH. Compose support requires docker compose (the v2 plugin, not the legacy docker-compose).

Usage

Dockerfile-per-app

# apps/myapp/app.toml
[app]
mode = "docker"
port = 8080            # in-container port to expose
dockerfile = "Dockerfile"   # default
context = "."               # default
build_args = { ENV = "dev" }
env = { LOG_LEVEL = "info" }

Pre-built image

[app]
mode = "image"
image = "ghcr.io/myorg/myapp:1.2.3"
port = 8080
env = { LOG_LEVEL = "info" }

docker-compose

[app]
mode = "compose"
compose_file = "docker-compose.yml"   # default
service = "web"                       # which service receives HTTP
port = 8080                           # service's internal port

Already-running container

[app]
mode = "docker_attached"
container = "my-running-container"
port = 8080

How it works

Each mode registers a BackendStrategy against enlace's open/closed extension point. The strategy provides:

  • a TOML field overlay so app.toml carries docker-specific config;
  • a make_asgi that proxies HTTP to the container's published host port;
  • a make_lifecycle (for the supervisable modes) that shells out to docker / docker compose for start, stop, health, and log streaming.

License

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

enlace_docker-0.0.5.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enlace_docker-0.0.5-py3-none-any.whl (33.5 kB view details)

Uploaded Python 3

File details

Details for the file enlace_docker-0.0.5.tar.gz.

File metadata

  • Download URL: enlace_docker-0.0.5.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for enlace_docker-0.0.5.tar.gz
Algorithm Hash digest
SHA256 544a5a1b0c5e96e469e5c87ebcbc250e2bb5f290190b1c06eab9eaedf18c1beb
MD5 1fdb553de19fbff6c5daee9382f70546
BLAKE2b-256 b06fbedab46e11eaa6b967fc0328e867fe1bf1fd7d6112ad7b6b1ea9f913cb1e

See more details on using hashes here.

File details

Details for the file enlace_docker-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: enlace_docker-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 33.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for enlace_docker-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 be5acfcb8c73bfeabbcbf040d6278e22d84cd8b10c563b75e4a37361ada5865c
MD5 c19a12a8d13926a5b93d5b04a768d543
BLAKE2b-256 18711a243e266f309474f60483771f548f149d3745edb672be0c04abf01c23fa

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page