mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-09 13:35:19 +00:00
refactor(docker): remove unused environment file command generation and simplify Docker command construction
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
|||||||
getDockerContextPath,
|
getDockerContextPath,
|
||||||
} from "../filesystem/directory";
|
} from "../filesystem/directory";
|
||||||
import type { ApplicationNested } from ".";
|
import type { ApplicationNested } from ".";
|
||||||
import { createEnvFileCommand } from "./utils";
|
|
||||||
|
|
||||||
export const getDockerCommand = (application: ApplicationNested) => {
|
export const getDockerCommand = (application: ApplicationNested) => {
|
||||||
const {
|
const {
|
||||||
@@ -68,21 +67,7 @@ export const getDockerCommand = (application: ApplicationNested) => {
|
|||||||
commandArgs.push("--secret", `type=env,id=${key}`);
|
commandArgs.push("--secret", `type=env,id=${key}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
const command = `
|
||||||
Do not generate an environment file when publishDirectory is specified,
|
|
||||||
as it could be publicly exposed.
|
|
||||||
*/
|
|
||||||
let command = "";
|
|
||||||
if (!publishDirectory) {
|
|
||||||
command += createEnvFileCommand(
|
|
||||||
dockerFilePath,
|
|
||||||
env,
|
|
||||||
application.environment.project.env,
|
|
||||||
application.environment.env,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
command += `
|
|
||||||
echo "Building ${appName}" ;
|
echo "Building ${appName}" ;
|
||||||
cd ${dockerContextPath} || {
|
cd ${dockerContextPath} || {
|
||||||
echo "❌ The path ${dockerContextPath} does not exist" ;
|
echo "❌ The path ${dockerContextPath} does not exist" ;
|
||||||
|
|||||||
Reference in New Issue
Block a user