Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 21 additions & 5 deletions packages/server/src/services/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export const getDokployImageTag = () => {
};

export const getDokployImage = () => {
if (process.env.DOKPLOY_IMAGE) {
return process.env.DOKPLOY_IMAGE;
}
return `dokploy/dokploy:${getDokployImageTag()}`;
};

Expand Down Expand Up @@ -59,6 +62,11 @@ export const getUpdateData = async (
currentVersion: string,
): Promise<IUpdateData> => {
try {
// Skip update checks for custom images - users manage their own updates
if (process.env.DOKPLOY_IMAGE) {
return DEFAULT_UPDATE_DATA;
}

const baseUrl =
"https://hub.docker.com/v2/repositories/dokploy/dokploy/tags";
let url: string | null = `${baseUrl}?page_size=100`;
Expand Down Expand Up @@ -299,13 +307,21 @@ export const reloadDockerResource = async (
let command = "";
if (resourceType === "service") {
if (resourceName === "dokploy") {
const currentImageTag = getDokployImageTag();
let imageTag = version;
if (currentImageTag === "canary" || currentImageTag === "feature") {
imageTag = currentImageTag;
const image = getDokployImage();
// For custom images (DOKPLOY_IMAGE), use the full image path as-is
// For canary/feature branches, keep the current tag
// For stable releases, use the provided version or current tag
let finalImage = image;
if (!process.env.DOKPLOY_IMAGE) {
const currentImageTag = getDokployImageTag();
if (currentImageTag === "canary" || currentImageTag === "feature") {
finalImage = `dokploy/dokploy:${currentImageTag}`;
} else if (version) {
finalImage = `dokploy/dokploy:${version}`;
}
}

command = `docker service update --force --image dokploy/dokploy:${imageTag} ${resourceName}`;
command = `docker service update --force --image ${finalImage} ${resourceName}`;
} else {
command = `docker service update --force ${resourceName}`;
}
Expand Down