Deploy a Compose app
Put a Docker Compose app on your server with a domain, a health check and automatic rollback.
NeoRun deploys apps described by a Docker Compose file. The agent plans the deploy, NeoRun checks it against your server, and then the deploy runs by itself or waits for you, depending on the server's safety level.
What you need
- A connected server (see Quickstart) and an agent with write access.
- A Compose file whose services use images that already exist. NeoRun does not build images: build in CI, push, and reference the image.
- A domain whose DNS points at the server.
Ask your agent
Deploy this app to web-1 on shop.example.org.
The agent calls these tools:
list_serversandinspect_serverto look at the server: what listens on which ports, which proxies and sites exist, Docker, disk.plan_deploywith the server, an app name, the Compose file text and the domain. NeoRun turns it into a typed plan with a hash. This changes nothing on the server.deploywith the plan id. NeoRun runs it, or holds it for you.get_statusuntil it is final. The answer says what happened, in NeoRun's words.
What Compose NeoRun accepts
NeoRun accepts a safe subset of Compose and refuses anything else, with a reason.
- Accepted:
image(required),command,entrypoint,environment,working_dir,user,labels,restart,healthcheck,depends_on,expose,ports(only to name the container port to route to), named volumes, anddeploy.resources.limitsforcpusandmemory. - Refused because they reach outside the container:
privileged,cap_add,devices,network_mode,pid,ipc,userns_mode,security_opt,sysctls,cgroup_parent, bind mounts, the Docker socket, custom or external networks. - Not supported yet:
build,env_file,secrets,configs.
NeoRun never publishes your app's ports on the server. Traffic comes in through NeoRun's own edge, a Caddy that NeoRun runs on the server.
How it reaches the internet
NeoRun picks a routing mode from what the server looks like:
| Mode | When | Status |
|---|---|---|
direct | Nothing listens publicly on 80 and 443. NeoRun's Caddy publishes them and gets a certificate | Built |
behind | A known proxy (nginx, Apache, Caddy, HAProxy, Traefik) holds 80 and 443. NeoRun's edge listens on 127.0.0.1:8780, and the plan names the one step you do by hand: point the proxy's site for the domain at it | Built |
integrate | NeoRun adds the site to your existing proxy itself, and checks that every other site still answers | Planned |
takeover | NeoRun stops your old proxy and owns 80 and 443, with your approval | Planned |
Planned
integrate and takeover are designed and not built. Today a server that already runs nginx, Apache or Caddy
gets behind.
The first deploy in direct mode opens ports 80 and 443 to the world, which is never automatic, so the first
deploy to a fresh server waits for you.
What the deploy does
Each step has an undo.
- Make sure NeoRun's edge exists (only on the first deploy).
- Pull the images.
- Create the named volumes. Volumes are never deleted automatically.
- Stop the previous version's services that use volumes, so two versions never write the same volume.
- Start the new version on its own network, with no host ports.
- Health check: the Compose healthchecks are healthy, and an HTTP request to the routed service answers below 500.
- Switch the route to the new version.
- Verify through the public URL.
- Stop (not remove) the previous version, and keep it for rollback.
NeoRun takes a snapshot of a volume before it changes data, and services that keep data run apart from the versions, so the live app stays up while the new version is checked. If a deploy replaces a data service, the plan states the short downtime before you approve it.
After the switch, NeoRun watches the deployment for 10 minutes. If its health fails, NeoRun rolls back automatically. See Checks, watch and undo and Roll back a deploy.