Deployments

Deploy a release

Starts a new release of the app, from an uploaded sourceID or, for docker apps, from an image. Send exactly one of them. Releases that are still building or deploying are cancelled. Source releases are built first; image releases are deployed directly.

Limit: the number of deployments per day depends on your bundle plan. Team permission: deploy, operate or manage.

post/v2/projects/{project_id}/releases

Request

  • Base URL
    https://api.liara.ir
  • URL
    https://api.liara.ir/v2/projects/{project_id}/releases
  • Auth
    HTTP bearer

Path parameters

project_idstring required

The app's name.

Query parameters

teamIDstring

24-character hexadecimal ID.

Run the request in the context of a team you belong to, instead of your personal account.

Request body

type'node' | 'next' | 'react' | 'vue' | 'angular' | 'static' | 'laravel' | 'php' | 'django' | 'flask' | 'python' | 'netcore' | 'dotnet' | 'go' | 'docker' required

The app's platform.

portinteger required

The port your app listens on. For static, react, vue, angular, laravel, php, django and flask it's always 80, and for next always 3000, whatever you send.

sourceIDstring

From POST /v2/projects/{project_id}/sources.

imagestring

Only for docker apps. A container image to deploy instead of source code.

envsobject

If not empty, replaces all of the app's environment variables.

argsstring[]

Arguments to start the app with.

cronstring[]

Scheduled jobs, each a cron schedule followed by a command. Only for next, laravel, php, python, django, flask and go.

messagestring

A note about the release. Longer text is cut off.

platformConfigobject

Platform-specific build settings. The allowed fields depend on type:

PlatformFields
nodeversion (8, 10, 11, 12, 14, 16, 18, 20, 22, 24 or latest), npmAudit, npmCiFallback, timezone, mirror
nextnodeVersion (20, 22, 24), modifyConfig, npmCiFallback, mirror
react, angularmirror, sourceMap
vuemirror
laravelphpVersion (7.2–8.4, legacy or old-release 8.2), timezone, npmMirror, composerMirror, routeCache, configCache, buildAssets, ssr, modifyImagickPolicy, installDevDependencies, reverb, reverbPath, modifyHtaccess
phpversion (7.2–8.4), timezone, composerMirror
djangopythonVersion (3.7–3.13), nodeVersion (14, 16, 18, 20), timezone, settingsFile, modifySettings, collectStatic, compileMessages, geospatial, pipTimeout, mirror
flaskpythonVersion (3.7–3.13), nodeVersion (14, 16, 18, 20), appModule, timezone, mirror
pythonversion (3.8–3.13), timezone, mirror
netcore, dotnetversion (2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 or 10.0), timezone, finalDllName, csprojectFile
goversion (1.21–1.25), cgoEnabled, mainFile, timezone

mirror (and npmMirror / composerMirror) download packages through Liara's package mirrors.

Response

The release was created.

releaseIDstring

Changes

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