mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
feat(libsql): implement libsql service schema and update related components
- Created a new SQL type for 'libsql' and established a corresponding table with necessary fields and constraints. - Updated existing tables (backup, mount, volume_backup) to include foreign key references to 'libsql'. - Enhanced the libsql schema in the application to support additional fields such as stopGracePeriodSwarm and endpointSpecSwarm. - Adjusted form handling and validation to accommodate the new libsql service type, improving overall integration and functionality.
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
keepLatestNBackups,
|
||||
runCommand,
|
||||
runComposeBackup,
|
||||
runLibsqlBackup,
|
||||
runMariadbBackup,
|
||||
runMongoBackup,
|
||||
runMySqlBackup,
|
||||
@@ -38,6 +39,7 @@ export const runJobs = async (job: QueueJob) => {
|
||||
mysql,
|
||||
mongo,
|
||||
mariadb,
|
||||
libsql,
|
||||
compose,
|
||||
backupType,
|
||||
} = backup;
|
||||
@@ -75,6 +77,14 @@ export const runJobs = async (job: QueueJob) => {
|
||||
}
|
||||
await runMariadbBackup(mariadb, backup);
|
||||
await keepLatestNBackups(backup, server.serverId);
|
||||
} else if (databaseType === "libsql" && libsql) {
|
||||
const server = await findServerById(libsql.serverId as string);
|
||||
if (server.serverStatus === "inactive") {
|
||||
logger.info("Server is inactive");
|
||||
return;
|
||||
}
|
||||
await runLibsqlBackup(libsql, backup);
|
||||
await keepLatestNBackups(backup, server.serverId);
|
||||
}
|
||||
} else if (backupType === "compose" && compose) {
|
||||
const server = await findServerById(compose.serverId as string);
|
||||
@@ -141,6 +151,7 @@ export const initializeJobs = async () => {
|
||||
mysql: true,
|
||||
postgres: true,
|
||||
mongo: true,
|
||||
libsql: true,
|
||||
compose: true,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user