Create or update an app from a docker-compose.yml (super_admin only)
POST
/apps/deploy
const url = 'https://your-server.example/api/apps/deploy';const options = { method: 'POST', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '{"name":"example","compose":"example","env":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-server.example/api/apps/deploy \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '{ "name": "example", "compose": "example", "env": "example" }'Writes the compose file under the apps directory and triggers a deploy.
Use validate-compose first to catch label or syntax errors. A compose
file that fails security checks is refused with 400 and a JSON
{error, violations} body listing every reason.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
App name (becomes the slug).
string
compose
required
Full docker-compose.yml content.
string
env
Optional .env file content.
string
Example generated
{ "name": "example", "compose": "example", "env": "example"}Responses
Section titled “Responses”Deploy accepted; watch progress via the deploy logs WebSocket.
Media typeapplication/json
object
slug
string
status
string
Example
{ "status": "deploying"}Invalid request, or the compose file fails security checks (JSON body with every reason).
object
error
string
violations
Array<string>
Example
{ "error": "compose file contains disallowed directives", "violations": [ "service \"web\": privileged mode not allowed" ]}string
Requires super_admin.