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.
This commit is contained in:
2026-09-24 11:11:00 +00:00
parent 609d9e22a8
commit 4fa6c0cf2e
8 changed files with 326 additions and 3 deletions
+35
View File
@@ -71,3 +71,38 @@ jobs:
push: true
pull: true
tags: ${{ steps.meta.outputs.tags }}
build_and_push_native_docker_image:
name: "Build and push native docker image"
runs-on: hostinger
steps:
- name: Checkout sources
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea container registry
uses: docker/login-action@v3
with:
registry: gitea.woggioni.net
username: woggioni-opencode-agent
password: ${{ secrets.PUBLISHER_TOKEN }}
- name: Extract metadata for native image tags
id: meta
uses: docker/metadata-action@v5
with:
images: gitea.woggioni.net/woggioni/pyfconfig
flavor: |
latest=false
suffix=-native
tags: |
type=match,pattern=release/(.*),group=1
type=raw,value=latest
- name: Build and push native docker image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.native
platforms: linux/amd64
push: true
pull: true
tags: ${{ steps.meta.outputs.tags }}