diff --git a/components/dashboard/compose/general/actions.tsx b/components/dashboard/compose/general/actions.tsx
index 85ad4506..754fb345 100644
--- a/components/dashboard/compose/general/actions.tsx
+++ b/components/dashboard/compose/general/actions.tsx
@@ -10,7 +10,7 @@ import {
} from "@/components/ui/dropdown-menu";
import { Toggle } from "@/components/ui/toggle";
import { api } from "@/utils/api";
-import { ExternalLink, Globe, Terminal } from "lucide-react";
+import { CheckCircle2, ExternalLink, Globe, Terminal } from "lucide-react";
import Link from "next/link";
import { toast } from "sonner";
import { DockerTerminalModal } from "../../settings/web-server/docker-terminal-modal";
@@ -50,7 +50,6 @@ export const ComposeActions = ({ composeId }: Props) => {
return (
-
{
toast.error("Error to update Auto Deploy");
});
}}
+ className="flex flex-row gap-2 items-center"
>
- Autodeploy
+ Autodeploy {data?.autoDeploy && }
{data?.composeType === "docker-compose" && (
diff --git a/server/db/schema/application.ts b/server/db/schema/application.ts
index d9b9f247..8b3c4b11 100644
--- a/server/db/schema/application.ts
+++ b/server/db/schema/application.ts
@@ -122,7 +122,7 @@ export const applications = pgTable("application", {
owner: text("owner"),
branch: text("branch"),
buildPath: text("buildPath").default("/"),
- autoDeploy: boolean("autoDeploy"),
+ autoDeploy: boolean("autoDeploy").$defaultFn(() => true),
// Docker
username: text("username"),
password: text("password"),
diff --git a/server/db/schema/compose.ts b/server/db/schema/compose.ts
index 78033793..1ac9a33d 100644
--- a/server/db/schema/compose.ts
+++ b/server/db/schema/compose.ts
@@ -37,7 +37,7 @@ export const compose = pgTable("compose", {
repository: text("repository"),
owner: text("owner"),
branch: text("branch"),
- autoDeploy: boolean("autoDeploy"),
+ autoDeploy: boolean("autoDeploy").$defaultFn(() => true),
// Git
customGitUrl: text("customGitUrl"),
customGitBranch: text("customGitBranch"),