mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #21 from Dokploy/fix/builder-env-wrong-way
Fix/builder env wrong way
This commit is contained in:
1
.github/workflows/pull-request.yml
vendored
1
.github/workflows/pull-request.yml
vendored
@@ -3,6 +3,7 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
- canary
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ export const AddDomain = ({
|
|||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<FormLabel>HTTPS</FormLabel>
|
<FormLabel>HTTPS</FormLabel>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
Automatically will have SSL Certificate.
|
Automatically provision SSL Certificate.
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
</div>
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ export const UpdateDomain = ({ domainId }: Props) => {
|
|||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<FormLabel>HTTPS</FormLabel>
|
<FormLabel>HTTPS</FormLabel>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
Automatically will have SSL Certificate.
|
Automatically provision SSL Certificate.
|
||||||
</FormDescription>
|
</FormDescription>
|
||||||
</div>
|
</div>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
|
|||||||
@@ -6,35 +6,35 @@ import type { WriteStream } from "node:fs";
|
|||||||
|
|
||||||
// TODO: integrate in the vps sudo chown -R $(whoami) ~/.docker
|
// TODO: integrate in the vps sudo chown -R $(whoami) ~/.docker
|
||||||
export const buildHeroku = async (
|
export const buildHeroku = async (
|
||||||
application: ApplicationNested,
|
application: ApplicationNested,
|
||||||
writeStream: WriteStream,
|
writeStream: WriteStream,
|
||||||
) => {
|
) => {
|
||||||
const { env, appName } = application;
|
const { env, appName } = application;
|
||||||
const buildAppDirectory = getBuildAppDirectory(application);
|
const buildAppDirectory = getBuildAppDirectory(application);
|
||||||
const envVariables = prepareEnvironmentVariables(env);
|
const envVariables = prepareEnvironmentVariables(env);
|
||||||
try {
|
try {
|
||||||
const args = [
|
const args = [
|
||||||
"build",
|
"build",
|
||||||
appName,
|
appName,
|
||||||
"--path",
|
"--path",
|
||||||
buildAppDirectory,
|
buildAppDirectory,
|
||||||
"--builder",
|
"--builder",
|
||||||
"heroku/builder:22",
|
"heroku/builder:22",
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const env in envVariables) {
|
for (const env of envVariables) {
|
||||||
args.push("--env", env);
|
args.push("--env", env);
|
||||||
}
|
}
|
||||||
|
|
||||||
await spawnAsync("pack", args, (data) => {
|
await spawnAsync("pack", args, (data) => {
|
||||||
if (writeStream.writable) {
|
if (writeStream.writable) {
|
||||||
writeStream.write(data);
|
writeStream.write(data);
|
||||||
}
|
}
|
||||||
// Stream the data
|
// Stream the data
|
||||||
console.log(data);
|
console.log(data);
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,25 +6,26 @@ import type { WriteStream } from "node:fs";
|
|||||||
|
|
||||||
// TODO: integrate in the vps sudo chown -R $(whoami) ~/.docker
|
// TODO: integrate in the vps sudo chown -R $(whoami) ~/.docker
|
||||||
export const buildNixpacks = async (
|
export const buildNixpacks = async (
|
||||||
application: ApplicationNested,
|
application: ApplicationNested,
|
||||||
writeStream: WriteStream,
|
writeStream: WriteStream,
|
||||||
) => {
|
) => {
|
||||||
const { env, appName } = application;
|
const { env, appName } = application;
|
||||||
const buildAppDirectory = getBuildAppDirectory(application);
|
const buildAppDirectory = getBuildAppDirectory(application);
|
||||||
const envVariables = prepareEnvironmentVariables(env);
|
const envVariables = prepareEnvironmentVariables(env);
|
||||||
try {
|
try {
|
||||||
const args = ["build", buildAppDirectory, "--name", appName];
|
const args = ["build", buildAppDirectory, "--name", appName];
|
||||||
|
|
||||||
for (const env in envVariables) {
|
for (const env of envVariables) {
|
||||||
args.push("--env", env);
|
args.push("--env", env);
|
||||||
}
|
}
|
||||||
await spawnAsync("nixpacks", args, (data) => {
|
|
||||||
if (writeStream.writable) {
|
await spawnAsync("nixpacks", args, (data) => {
|
||||||
writeStream.write(data);
|
if (writeStream.writable) {
|
||||||
}
|
writeStream.write(data);
|
||||||
});
|
}
|
||||||
return true;
|
});
|
||||||
} catch (e) {
|
return true;
|
||||||
throw e;
|
} catch (e) {
|
||||||
}
|
throw e;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,33 +6,33 @@ import { prepareEnvironmentVariables } from "../docker/utils";
|
|||||||
|
|
||||||
// TODO: integrate in the vps sudo chown -R $(whoami) ~/.docker
|
// TODO: integrate in the vps sudo chown -R $(whoami) ~/.docker
|
||||||
export const buildPaketo = async (
|
export const buildPaketo = async (
|
||||||
application: ApplicationNested,
|
application: ApplicationNested,
|
||||||
writeStream: WriteStream,
|
writeStream: WriteStream,
|
||||||
) => {
|
) => {
|
||||||
const { env, appName } = application;
|
const { env, appName } = application;
|
||||||
const buildAppDirectory = getBuildAppDirectory(application);
|
const buildAppDirectory = getBuildAppDirectory(application);
|
||||||
const envVariables = prepareEnvironmentVariables(env);
|
const envVariables = prepareEnvironmentVariables(env);
|
||||||
try {
|
try {
|
||||||
const args = [
|
const args = [
|
||||||
"build",
|
"build",
|
||||||
appName,
|
appName,
|
||||||
"--path",
|
"--path",
|
||||||
buildAppDirectory,
|
buildAppDirectory,
|
||||||
"--builder",
|
"--builder",
|
||||||
"paketobuildpacks/builder-jammy-full",
|
"paketobuildpacks/builder-jammy-full",
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const env in envVariables) {
|
for (const env of envVariables) {
|
||||||
args.push("--env", env);
|
args.push("--env", env);
|
||||||
}
|
}
|
||||||
|
|
||||||
await spawnAsync("pack", args, (data) => {
|
await spawnAsync("pack", args, (data) => {
|
||||||
if (writeStream.writable) {
|
if (writeStream.writable) {
|
||||||
writeStream.write(data);
|
writeStream.write(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user