hosting

POST /api/v1/hosting/apps/{app_id}/services

Request

  • Base URL
    https://composal.com (the document declares no server; this is the origin it was published from)
  • URL
    https://composal.com/api/v1/hosting/apps/{app_id}/services
  • Auth
    HTTP bearer

Path parameters

app_idstring required

Request body

slugstring required
namestring required
kind'web' | 'worker' | 'cron' | 'static' | 'private' required
runtime'docker' | 'node' | 'ruby' | 'python' | 'go' | 'rust' | 'static' | 'generic' required
runtime_adapter_kind'nomad' | 'database' required
runtime_adapter_settings_jsonstring
nomad_namespacestring
nomad_regionstring
cpu_mhzinteger
memory_mbinteger
memory_max_mbinteger

Hard memory limit in MB the task may burst to (Nomad MemoryMaxMB). Must be >= memory_mb, which stays the scheduler reservation. Omit to render no limit beyond the reservation.

disk_mbinteger
nomad_constraints_jsonstring
nomad_update_strategy_jsonstring
nomad_ulimits_jsonstring

Docker task ulimits as a JSON object of rlimit name to "soft:hard" (e.g. {"nofile":"65536:65536"}).

nomad_kill_timeout_secondsinteger

Seconds the task gets after SIGTERM before SIGKILL. Omit to leave Nomad's 5s default.

nomad_shutdown_delay_secondsinteger

Seconds Nomad waits between deregistering the group's services and sending SIGTERM. Omit to leave Nomad's 0s default.

source_pathstring required
build_commandstring
release_commandstring
prestart_commandstring
start_commandstring required
healthcheck_pathstring
schedulestring
internal_portinteger
desired_instancesinteger required
publicly_accessibleboolean required
auto_deployboolean required
deploy_pathsstring[]

Response

App service created

Changes

No recorded changes to this operation across all 4 revisions of this API.