mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-10 00:15:28 +02:00
feat: add support for command arguments in application and database schemas
- Updated the application, mariadb, mongo, mysql, postgres, and redis schemas to include an optional `args` field for command arguments. - Enhanced the AddCommand and ShowCustomCommand components to handle multiple arguments using a dynamic form. - Modified the database build functions to incorporate the new `args` parameter when creating containers. - Added SQL migrations to update the database schema for existing applications and services to accommodate the new `args` field.
This commit is contained in:
@@ -28,6 +28,7 @@ export const buildMongo = async (mongo: MongoNested) => {
|
||||
databaseUser,
|
||||
databasePassword,
|
||||
command,
|
||||
args,
|
||||
mounts,
|
||||
replicaSets,
|
||||
} = mongo;
|
||||
@@ -128,12 +129,17 @@ ${command ?? "wait $MONGOD_PID"}`;
|
||||
Command: ["/bin/bash"],
|
||||
Args: ["-c", startupScript],
|
||||
}
|
||||
: {
|
||||
...(command && {
|
||||
Command: ["/bin/bash"],
|
||||
Args: ["-c", command],
|
||||
}),
|
||||
}),
|
||||
: {}),
|
||||
...(command &&
|
||||
!replicaSets && {
|
||||
Command: command.split(" "),
|
||||
}),
|
||||
...(args &&
|
||||
args.length > 0 &&
|
||||
!replicaSets && {
|
||||
Args: args,
|
||||
}),
|
||||
|
||||
Labels,
|
||||
},
|
||||
Networks,
|
||||
|
||||
Reference in New Issue
Block a user