Real variables · real walkthroughs

Examples

Every variable, image and command on this page is taken from the actual egg JSON, the same values your panel shows in the Startup tab.

What you're importing

The egg is a PTDL_v2 JSON file. An excerpt of the real thing, image, startup command and the two variables every walkthrough below touches:

{
  "name": "Prog-Language Eggs",
  "docker_images": {
    "Multi-Language (50+ Languages)": "ghcr.io/potenfyr-studios/prog-language-eggs:latest"
  },
  "startup": "bash /usr/local/bin/run.sh",
  "variables": [
    {
      "name": "Target Language",
      "env_variable": "LANGUAGE",
      "default_value": "auto",
      "rules": "nullable|string|max:40"
    },
    {
      "name": "Runtime Version",
      "env_variable": "RUNTIME_VERSION",
      "default_value": "latest",
      "rules": "nullable|string|max:30"
    }
  ]
}

Full file: egg-programming-multi.json · 41 variables total.

Run a FastAPI app

A minimal FastAPI service. The egg detects requirements.txt, installs uv/pip dependencies and launches uvicorn bound to 0.0.0.0:$SERVER_PORT.

requirements.txt
fastapi
uvicorn
main.py
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def root():
    return {"status": "ok"}

@app.get("/healthz")
def healthz():
    return {"healthy": True}
Startup tab, panel variables
LANGUAGE=python            # or 'auto', requirements.txt triggers Python
RUNTIME_VERSION=3.12       # exact pin; 'latest' resolves once then pins
MAIN_FILE=auto             # detection finds main.py / app entry
AUTO_INSTALL_DEPS=1        # pip install -r requirements.txt on boot
HEALTH_CHECK_PATH=/healthz # probe http://127.0.0.1:$SERVER_PORT/healthz after boot

On boot the launcher resolves Python 3.12.x, syncs dependencies, and, when RUNNER=uvicorn is selected or detected, announces the effective command:

uvicorn main:app --host 0.0.0.0 --port $SERVER_PORT
VariableDefaultEditableDescription
LANGUAGEautoyesTarget language or 'auto' for intelligent file auto-detection. After the first boot the detected value is pinned; set to 'auto-detect' to clear the pin and re-run detection.
RUNTIME_VERSIONlatestyesVersion of the primary runtime: 22 | 22.1 | 22.1.4 or keywords latest, stable, lts, alpha, beta, rc, preview, nightly. Validated & resolved from live upstream feeds. 'latest' resolves once, then pins to the exact version; set to 'auto-detect' to re-resolve.
AUTO_INSTALL_DEPS1yesAutomatically install missing dependencies on container boot (1 = Enabled, 0 = Disabled).
HEALTH_CHECK_PATH-yesHTTP path probed after boot (e.g. /healthz). Empty = disabled. Probe targets http://127.0.0.1:$SERVER_PORT<path>.

Compile & run a binary

Compiled languages use the same pattern: BUILD_COMMAND compiles, MAIN_FILE points at the artifact. Detection fires on go.mod.

Startup tab, panel variables
LANGUAGE=golang
RUNTIME_VERSION=stable     # Go SDK resolved from live upstream feeds
BUILD_COMMAND=go build -o server .
MAIN_FILE=./server         # execute the built artifact
CLEAN_BUILD_CACHE=1        # purge compiler caches after build to save disk
VariableDefaultEditableDescription
BUILD_COMMAND-yesOptional build or compilation command (e.g. 'npm run build', 'cargo build --release').
MAIN_FILEautoyesThe main script or file to execute (leave 'auto' for smart detection). 'auto' resolves to the concrete entry point on first boot and is pinned; set to 'auto-detect' to re-arm.
CLEAN_BUILD_CACHE1yesPurge compiler caches after build to save disk space (1 = Enabled, 0 = Disabled).

Deploy straight from Git

Skip uploads entirely: point the egg at a repository and it clones on install, then re-syncs on every boot. Private repos use a token that is redacted from console output.

Startup tab, panel variables
GIT_REPO=https://github.com/you/your-app
GIT_BRANCH=main
GIT_AUTH_TOKEN=ghp_xxx      # optional, private repos only
LANGUAGE=auto               # detect the stack from the cloned files

The console prints the installed commit after sync ([PotenFYR][i] Repository at commit …) so you can verify latest-vs-old at a glance. Only committed files survive a reinstall.

VariableDefaultEditableDescription
GIT_REPO-yesGit repository URL to clone and sync on startup.
GIT_BRANCHmainyesTarget branch to clone or track from the Git repository.
GIT_AUTH_TOKEN-yesPersonal Access Token for private Git repositories.
AUTO_RESTART0yesAutomatically restart process on unexpected crash (1 = Enabled, 0 = Disabled).

Same thing outside a panel

No panel? The image runs anywhere docker runs, the FastAPI example again, standalone:

docker run -d \
  --name fastapi-app \
  -p 8080:8080 \
  -e SERVER_PORT=8080 \
  -e LANGUAGE=python \
  -e RUNTIME_VERSION=3.12 \
  -e AUTO_INSTALL_DEPS=1 \
  -v "$PWD:/home/container" \
  ghcr.io/potenfyr-studios/prog-language-eggs:latest