mirror of
https://github.com/andwati/dokploy.git
synced 2026-10-20 12:04:29 +00:00
Merge pull request #4923 from dmtrTm/fix/rollback-environment-variables
fix: resolve environment variables on application rollback
(cherry picked from commit 46c87a22b0)
This commit is contained in:
committed by
Mauricio Siu
parent
b7fdbd4704
commit
112b2c8358
@@ -1,4 +1,5 @@
|
||||
import type { Application } from "@dokploy/server/services/application";
|
||||
import type { Environment } from "@dokploy/server/services/environment";
|
||||
import type { Mount } from "@dokploy/server/services/mount";
|
||||
import type { Port } from "@dokploy/server/services/port";
|
||||
import type { Project } from "@dokploy/server/services/project";
|
||||
@@ -27,7 +28,7 @@ export const rollbacks = pgTable("rollback", {
|
||||
.$defaultFn(() => new Date().toISOString()),
|
||||
fullContext: jsonb("fullContext").$type<
|
||||
Application & {
|
||||
environment: {
|
||||
environment: Environment & {
|
||||
project: Project;
|
||||
};
|
||||
mounts: Mount[];
|
||||
|
||||
@@ -19,6 +19,7 @@ import { execAsync, execAsyncRemote } from "../utils/process/execAsync";
|
||||
import { getRemoteDocker } from "../utils/servers/remote-docker";
|
||||
import { type Application, findApplicationById } from "./application";
|
||||
import { findDeploymentById } from "./deployment";
|
||||
import type { Environment } from "./environment";
|
||||
import type { Mount } from "./mount";
|
||||
import type { Port } from "./port";
|
||||
import type { Project } from "./project";
|
||||
@@ -201,7 +202,7 @@ const rollbackApplication = async (
|
||||
image: string,
|
||||
serverId?: string | null,
|
||||
fullContext?: Application & {
|
||||
environment: {
|
||||
environment: Environment & {
|
||||
project: Project;
|
||||
};
|
||||
mounts: Mount[];
|
||||
@@ -263,6 +264,7 @@ const rollbackApplication = async (
|
||||
const envVariables = prepareEnvironmentVariables(
|
||||
env,
|
||||
fullContext.environment.project.env,
|
||||
fullContext.environment.env,
|
||||
);
|
||||
|
||||
let rollbackImage = image;
|
||||
|
||||
Reference in New Issue
Block a user