Running-app artifacts (systemd + port + reverse_proxy)#54
Open
obaid wants to merge 1 commit into
Open
Conversation
Extends artifact publishing to type=app — a long-running process the agent runs, reverse-proxied by Caddy. - ArtifactAppService: allocates a per-server port (base 7000), writes a systemd unit (Restart=always) running the artifact's start_command from its workspace dir on $PORT, and starts/stops it over the CommandExecutor. - PublishArtifactService: for app artifacts, allocates the port + deploys the unit before syncing Caddy; unpublish stops + removes the unit. - ArtifactController: accepts type=app with a required start_command. Caddy already reverse_proxies app artifacts to their port (from the static PR). Tests cover port allocation, unit generation, deploy/remove, and the app publish/unpublish paths. Full suite green (761).
This was referenced Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature 1, PR 3 of ~5. Stacked on #53. Adds the
appartifact type — a long-running process the agent runs, reverse-proxied by Caddy.ArtifactAppServicesystemdunit (Restart=always) that runs the artifact'sstart_commandfrom its workspace dir on$PORT, and starts/stops it over theCommandExecutor.PublishArtifactServiceArtifactControllertype=appwith a requiredstart_command.reverse_proxys app artifacts to their port (added in #53'shandleBlock).Tests
Port allocation (base + increment per server), unit generation (workdir/port/command/restart), deploy + remove over a mocked executor, and the app publish/unpublish orchestration + API (incl.
start_commandrequired). Full suite green (761).Note
The agent's
start_commandruns as root on the agent's own server — consistent with the existing model where an agent already has full control of its box. Next: 4) gated access · 5) agent publish tool + cleanup.