mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-14 16:05:18 +00:00
refactor(settings): remove deprecated Docker image functions
- Eliminated the getDokployImage and pullLatestRelease functions to streamline the settings service. - Updated the code to focus on dynamic image retrieval, enhancing clarity and maintainability.
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import { readdirSync } from "node:fs";
|
import { readdirSync } from "node:fs";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { docker } from "@dokploy/server/constants";
|
|
||||||
import {
|
import {
|
||||||
execAsync,
|
execAsync,
|
||||||
execAsyncRemote,
|
execAsyncRemote,
|
||||||
@@ -26,19 +25,6 @@ export const getDokployImageTag = () => {
|
|||||||
return process.env.RELEASE_TAG || "latest";
|
return process.env.RELEASE_TAG || "latest";
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getDokployImage = () => {
|
|
||||||
return `dokploy/dokploy:${getDokployImageTag()}`;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const pullLatestRelease = async () => {
|
|
||||||
const stream = await docker.pull(getDokployImage());
|
|
||||||
await new Promise((resolve, reject) => {
|
|
||||||
docker.modem.followProgress(stream, (err, res) =>
|
|
||||||
err ? reject(err) : resolve(res),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Returns Dokploy docker service image digest */
|
/** Returns Dokploy docker service image digest */
|
||||||
export const getServiceImageDigest = async () => {
|
export const getServiceImageDigest = async () => {
|
||||||
const { stdout } = await execAsync(
|
const { stdout } = await execAsync(
|
||||||
|
|||||||
Reference in New Issue
Block a user