mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-13 23:45:17 +00:00
feat(environment): add createEnvFile option to environment settings
- Introduced a new boolean field `createEnvFile` in the environment schema to control the generation of an .env file during the build process. - Updated the form in the dashboard to include a toggle for `createEnvFile`, allowing users to enable or disable this feature. - Modified the Docker command generation logic to respect the `createEnvFile` flag, ensuring that the environment file is only created when appropriate. - Updated the database schema to include the `createEnvFile` column in the application table with a default value of true.
This commit is contained in:
@@ -181,6 +181,7 @@ export const applications = pgTable("application", {
|
||||
herokuVersion: text("herokuVersion").default("24"),
|
||||
publishDirectory: text("publishDirectory"),
|
||||
isStaticSpa: boolean("isStaticSpa"),
|
||||
createEnvFile: boolean("createEnvFile").notNull().default(true),
|
||||
createdAt: text("createdAt")
|
||||
.notNull()
|
||||
.$defaultFn(() => new Date().toISOString()),
|
||||
@@ -332,6 +333,7 @@ const createSchema = createInsertSchema(applications, {
|
||||
herokuVersion: z.string().optional(),
|
||||
publishDirectory: z.string().optional(),
|
||||
isStaticSpa: z.boolean().optional(),
|
||||
createEnvFile: z.boolean().optional(),
|
||||
owner: z.string(),
|
||||
healthCheckSwarm: HealthCheckSwarmSchema.nullable(),
|
||||
restartPolicySwarm: RestartPolicySwarmSchema.nullable(),
|
||||
@@ -501,6 +503,7 @@ export const apiSaveEnvironmentVariables = createSchema
|
||||
env: true,
|
||||
buildArgs: true,
|
||||
buildSecrets: true,
|
||||
createEnvFile: true,
|
||||
})
|
||||
.required();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user