Applications
Applications are containerized workloads deployed to your servers. Launcher supports git-based builds, container images, and Docker Compose deployments.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/applications | List applications (?projectId=) |
GET | /api/v1/applications/check-name | Check name availability (?name=&projectId=) |
POST | /api/v1/applications | Create application |
GET | /api/v1/applications/:id | Get application |
PUT | /api/v1/applications/:id | Update application |
DELETE | /api/v1/applications/:id | Delete application |
Lifecycle
| Method | Path | Description |
|---|---|---|
POST | /api/v1/applications/:id/deploy | Trigger a new deployment |
POST | /api/v1/applications/:id/start | Start the application |
POST | /api/v1/applications/:id/stop | Stop the application |
POST | /api/v1/applications/:id/restart | Restart the application |
POST | /api/v1/applications/:id/rollback | Rollback to previous deployment |
Scaling
| Method | Path | Description |
|---|---|---|
GET | /api/v1/applications/:id/instances | List running instances |
POST | /api/v1/applications/:id/scale | Scale replica count |
Configuration
| Method | Path | Description |
|---|---|---|
GET | /api/v1/applications/:id/dependencies | Get linked resources |
GET | /api/v1/applications/:id/env | Get environment variables |
PUT | /api/v1/applications/:id/env | Replace all environment variables |
PATCH | /api/v1/applications/:id/env | Merge environment variables |
Logs
| Method | Path | Description |
|---|---|---|
GET | /api/v1/applications/:id/runtime-logs | Runtime logs |
GET | /api/v1/applications/:id/build-logs | Build logs |
POST /api/v1/applications
{
"project_id": "uuid",
"environment_id": "uuid",
"server_id": "uuid",
"registry_id": "uuid",
"name": "my-api",
"app_type": "web",
"source_type": "git",
"repository_url": "https://github.com/user/repo",
"branch": "main",
"dockerfile_path": "Dockerfile",
"build_context": ".",
"build_args": {
"NODE_ENV": "production"
},
"env": {
"PORT": "3000"
},
"replicas": 2,
"exposed_port": 3000,
"autodeploy": true,
"watch_paths": "src/**",
"healthcheck_path": "/health",
"restart_policy": "always",
"start_command": "npm start"
}Source types:
source_type | Required fields |
|---|---|
git | repository_url, branch, dockerfile_path |
image | image_url |
compose | compose_file or compose_path |
App types: web (HTTP service), worker (background process), static (static files)
Application Object
{
"id": "uuid",
"project_id": "uuid",
"environment_id": "uuid",
"server_id": "uuid",
"name": "my-api",
"internal_id": "string",
"app_type": "web",
"source_type": "git",
"repository_url": "https://github.com/user/repo",
"branch": "main",
"dockerfile_path": "Dockerfile",
"build_context": ".",
"replicas": 2,
"exposed_port": 3000,
"autodeploy": true,
"status": "running",
"current_commit": "abc123",
"current_deployment_id": "uuid",
"healthcheck_path": "/health",
"restart_policy": "always",
"start_command": "npm start",
"consecutive_failures": 0,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}Status Values
running, stopped, deploying, failed, error, deleting
Last updated on