Files
pyfconfig/docker-compose.native.yml
woggioni 4fa6c0cf2e Add self-contained GraalPy native executable
Build the app to a single native binary with graalpy's 'standalone
native' command (Dockerfile.native). granian/rloop cannot be bundled
into a standalone binary, so the executable serves the app over ASGI
with Hypercorn via native/entrypoint.py, which also works around
GraalPy standalone quirks (socket.listen, str response bodies, signal
handling).

Adds docker-compose.native.yml, a -native CI job, and README docs.
2026-09-24 11:11:00 +00:00

25 lines
937 B
YAML

# Native standalone variant of the app. Standalone file (not an override) so
# it can be run alongside the other compose files:
#
# docker compose -f docker-compose.native.yml up -d --build
#
# The app is compiled to a single self-contained GraalPy native executable; see
# Dockerfile.native.
services:
pyfconfig-native:
build:
context: .
dockerfile: Dockerfile.native
image: pyfconfig-native:latest
restart: unless-stopped
environment:
# Public name shown in the HTML page and the curl examples; set to the
# deployment domain (e.g. "ifconfig.example.com").
SITE_NAME: ${SITE_NAME:-pyfconfig}
# Comma-separated CIDRs of trusted reverse proxies (e.g.
# "172.16.0.0/12"); required for correct client IPs when deployed
# behind a reverse proxy. Empty means no proxy is trusted.
TRUSTED_PROXY_CIDRS: ${TRUSTED_PROXY_CIDRS:-}
ports:
- "127.0.0.1:8080:8080"