feat(api): support sqlite databases in the databases API

This commit is contained in:
peaklabs-dev
2026-09-24 22:15:08 +02:00
parent 46e53e1fb8
commit 032ea6498c
5 changed files with 338 additions and 2 deletions
+127
View File
@@ -6706,6 +6706,10 @@
"type": "string",
"description": "MySQL conf"
},
"sqlite_databases": {
"type": "string",
"description": "Comma-separated SQLite database file names"
},
"health_check_enabled": {
"type": "boolean",
"description": "Enable the database healthcheck probe.",
@@ -8118,6 +8122,129 @@
]
}
},
"\/databases\/sqlite": {
"post": {
"tags": [
"Databases"
],
"summary": "Create (SQLite)",
"description": "Create a new SQLite database.",
"operationId": "create-database-sqlite",
"requestBody": {
"description": "Database data",
"required": true,
"content": {
"application\/json": {
"schema": {
"required": [
"server_uuid",
"project_uuid",
"environment_name",
"environment_uuid"
],
"properties": {
"server_uuid": {
"type": "string",
"description": "UUID of the server"
},
"project_uuid": {
"type": "string",
"description": "UUID of the project"
},
"environment_name": {
"type": "string",
"description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
},
"environment_uuid": {
"type": "string",
"description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
},
"destination_uuid": {
"type": "string",
"description": "UUID of the destination if the server has multiple destinations"
},
"sqlite_databases": {
"type": "string",
"description": "Comma-separated SQLite database file names"
},
"name": {
"type": "string",
"description": "Name of the database"
},
"description": {
"type": "string",
"description": "Description of the database"
},
"image": {
"type": "string",
"description": "Docker Image of the database"
},
"limits_memory": {
"type": "string",
"description": "Memory limit of the database"
},
"limits_memory_swap": {
"type": "string",
"description": "Memory swap limit of the database"
},
"limits_memory_swappiness": {
"type": "integer",
"description": "Memory swappiness of the database"
},
"limits_memory_reservation": {
"type": "string",
"description": "Memory reservation of the database"
},
"limits_cpus": {
"type": "string",
"description": "CPU limit of the database"
},
"limits_cpuset": {
"type": "string",
"description": "CPU set of the database"
},
"limits_cpu_shares": {
"type": "integer",
"description": "CPU shares of the database"
},
"instant_deploy": {
"type": "boolean",
"description": "Instant deploy the database"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Tags to assign to the database."
}
},
"type": "object"
}
}
}
},
"responses": {
"200": {
"description": "Database updated"
},
"401": {
"$ref": "#\/components\/responses\/401"
},
"400": {
"$ref": "#\/components\/responses\/400"
},
"422": {
"$ref": "#\/components\/responses\/422"
}
},
"security": [
{
"bearerAuth": []
}
]
}
},
"\/databases\/{uuid}\/logs": {
"get": {
"tags": [