Merge pull request #236 from Dokploy/fix/traefik-warnings-restart

fix(traefik): add try catch when starting service
This commit is contained in:
Mauricio Siu 2024-07-20 13:58:11 -06:00 committed by GitHub
commit 87b87b85c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 9 deletions

View File

@ -1,4 +1,3 @@
import React from "react";
import {
AlertDialog,
AlertDialogAction,
@ -13,6 +12,7 @@ import {
import { Button } from "@/components/ui/button";
import { api } from "@/utils/api";
import { TrashIcon } from "lucide-react";
import React from "react";
import { toast } from "sonner";
interface Props {

View File

@ -1,3 +1,8 @@
import {
DiscordIcon,
SlackIcon,
TelegramIcon,
} from "@/components/icons/notification-icons";
import {
Card,
CardContent,
@ -9,11 +14,6 @@ import { api } from "@/utils/api";
import { BellRing, Mail } from "lucide-react";
import { AddNotification } from "./add-notification";
import { DeleteNotification } from "./delete-notification";
import {
DiscordIcon,
SlackIcon,
TelegramIcon,
} from "@/components/icons/notification-icons";
import { UpdateNotification } from "./update-notification";
export const ShowNotifications = () => {

View File

@ -20,7 +20,7 @@
"db:push": "drizzle-kit --config ./server/db/drizzle.config.ts",
"db:truncate": "tsx -r dotenv/config ./server/db/reset.ts",
"db:studio": "drizzle-kit studio --config ./server/db/drizzle.config.ts",
"check": "biome check",
"check": "biome check --write --no-errors-on-unmatched --files-ignore-unknown=true",
"format": "biome format --write",
"lint": "biome lint",
"typecheck": "tsc",

View File

@ -58,8 +58,13 @@ export const settingsRouter = createTRPCRouter({
return true;
}),
reloadTraefik: adminProcedure.mutation(async () => {
await stopService("dokploy-traefik");
await startService("dokploy-traefik");
try {
await stopService("dokploy-traefik");
await startService("dokploy-traefik");
} catch (err) {
console.error(err);
}
return true;
}),
cleanUnusedImages: adminProcedure.mutation(async () => {