feat: add fullContext column to rollback table and update related functionality

- Introduced a new "fullContext" JSONB column in the "rollback" table to store additional context for rollbacks.
- Removed the "env" column from the "rollback" table to streamline data management.
- Updated the rollbacks service to handle the new "fullContext" field during rollback creation.
- Adjusted the application service to eliminate environment variable handling in rollback operations.
This commit is contained in:
Mauricio Siu
2025-06-02 21:02:17 -06:00
parent 4966bbeb73
commit f8baf6fe41
6 changed files with 5836 additions and 25 deletions

View File

@@ -41,10 +41,7 @@ import {
import { createTraefikConfig } from "@dokploy/server/utils/traefik/application";
import { TRPCError } from "@trpc/server";
import { eq } from "drizzle-orm";
import {
encodeBase64,
prepareEnvironmentVariables,
} from "../utils/docker/utils";
import { encodeBase64 } from "../utils/docker/utils";
import { getDokployUrl } from "./admin";
import {
createDeployment,
@@ -219,14 +216,8 @@ export const deployApplication = async ({
await updateApplicationStatus(applicationId, "done");
if (application.rollbackActive) {
const resolveEnvs = prepareEnvironmentVariables(
application.env,
application.project.env,
);
await createRollback({
appName: application.appName,
env: resolveEnvs.join("\n"),
deploymentId: deployment.deploymentId,
});
}