fix: heroku bp
This commit is contained in:
@@ -480,7 +480,6 @@ export const saveBuildLog = async ({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (isDev) return
|
|
||||||
return await prisma.buildLog.create({
|
return await prisma.buildLog.create({
|
||||||
data: {
|
data: {
|
||||||
line: addTimestamp, buildId, time: Number(day().valueOf()), applicationId
|
line: addTimestamp, buildId, time: Number(day().valueOf()), applicationId
|
||||||
|
@@ -2,13 +2,14 @@ import { executeDockerCmd, prisma } from "../common"
|
|||||||
import { saveBuildLog } from "./common";
|
import { saveBuildLog } from "./common";
|
||||||
|
|
||||||
export default async function (data: any): Promise<void> {
|
export default async function (data: any): Promise<void> {
|
||||||
const { buildId, applicationId, tag, dockerId, debug, workdir, baseDirectory } = data
|
const { buildId, applicationId, tag, dockerId, debug, workdir, baseDirectory, baseImage } = data
|
||||||
try {
|
try {
|
||||||
await saveBuildLog({ line: `Building image started.`, buildId, applicationId });
|
await saveBuildLog({ line: `Building image started.`, buildId, applicationId });
|
||||||
await executeDockerCmd({
|
await executeDockerCmd({
|
||||||
|
buildId,
|
||||||
debug,
|
debug,
|
||||||
dockerId,
|
dockerId,
|
||||||
command: `pack build -p ${workdir}${baseDirectory} ${applicationId}:${tag} --builder heroku/buildpacks:20`
|
command: `pack build -p ${workdir}${baseDirectory} ${applicationId}:${tag} --builder ${baseImage}`
|
||||||
})
|
})
|
||||||
await saveBuildLog({ line: `Building image successful.`, buildId, applicationId });
|
await saveBuildLog({ line: `Building image successful.`, buildId, applicationId });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@@ -523,9 +523,7 @@ export async function traefikConfiguration(request, reply) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
|
||||||
...traefik
|
|
||||||
}
|
|
||||||
const { fqdn, dualCerts } = await prisma.setting.findFirst();
|
const { fqdn, dualCerts } = await prisma.setting.findFirst();
|
||||||
if (fqdn) {
|
if (fqdn) {
|
||||||
const domain = getDomain(fqdn);
|
const domain = getDomain(fqdn);
|
||||||
@@ -546,30 +544,30 @@ export async function traefikConfiguration(request, reply) {
|
|||||||
for (const application of data.applications) {
|
for (const application of data.applications) {
|
||||||
configureMiddleware(application, traefik);
|
configureMiddleware(application, traefik);
|
||||||
}
|
}
|
||||||
for (const service of data.services) {
|
// for (const service of data.services) {
|
||||||
const { id, scriptName } = service;
|
// const { id, scriptName } = service;
|
||||||
|
|
||||||
configureMiddleware(service, traefik);
|
// configureMiddleware(service, traefik);
|
||||||
if (service.type === 'minio') {
|
// if (service.type === 'minio') {
|
||||||
service.id = id + '-minio';
|
// service.id = id + '-minio';
|
||||||
service.container = id;
|
// service.container = id;
|
||||||
service.domain = service.otherDomain;
|
// service.domain = service.otherDomain;
|
||||||
service.nakedDomain = service.otherNakedDomain;
|
// service.nakedDomain = service.otherNakedDomain;
|
||||||
service.isHttps = service.otherIsHttps;
|
// service.isHttps = service.otherIsHttps;
|
||||||
service.isWWW = service.otherIsWWW;
|
// service.isWWW = service.otherIsWWW;
|
||||||
service.port = 9000;
|
// service.port = 9000;
|
||||||
configureMiddleware(service, traefik);
|
// configureMiddleware(service, traefik);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (scriptName) {
|
// if (scriptName) {
|
||||||
traefik.http.middlewares[`${id}-redir`] = {
|
// traefik.http.middlewares[`${id}-redir`] = {
|
||||||
replacepathregex: {
|
// replacepathregex: {
|
||||||
regex: `/js/${scriptName}`,
|
// regex: `/js/${scriptName}`,
|
||||||
replacement: '/js/plausible.js'
|
// replacement: '/js/plausible.js'
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
for (const coolify of data.coolify) {
|
for (const coolify of data.coolify) {
|
||||||
configureMiddleware(coolify, traefik);
|
configureMiddleware(coolify, traefik);
|
||||||
}
|
}
|
||||||
|
@@ -86,7 +86,7 @@
|
|||||||
<path
|
<path
|
||||||
d="M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5"
|
d="M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5"
|
||||||
/>
|
/>
|
||||||
</svg>Build & Deploy</a
|
</svg>Configuration</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li
|
<li
|
||||||
|
@@ -415,15 +415,14 @@
|
|||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
<button
|
<button
|
||||||
class="btn btn-sm btn-ghost gap-2"
|
class="btn btn-sm gap-2"
|
||||||
class:btn-primary={$status.application.overallStatus !== 'degraded'}
|
|
||||||
disabled={!$isDeploymentEnabled}
|
disabled={!$isDeploymentEnabled}
|
||||||
on:click={() => handleDeploySubmit(false)}
|
on:click={() => handleDeploySubmit(false)}
|
||||||
>
|
>
|
||||||
{#if $status.application.overallStatus !== 'degraded'}
|
{#if $status.application.overallStatus !== 'degraded'}
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
class="w-6 h-6"
|
class="w-6 h-6 text-pink-500"
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
stroke-width="1.5"
|
stroke-width="1.5"
|
||||||
stroke="currentColor"
|
stroke="currentColor"
|
||||||
|
@@ -68,7 +68,9 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="max-w-screen-2xl mx-auto px-9">
|
<div class="max-w-screen-2xl mx-auto px-9">
|
||||||
|
{#if !filteredSources}
|
||||||
<div class="title pb-8">Git App</div>
|
<div class="title pb-8">Git App</div>
|
||||||
|
{/if}
|
||||||
<div class="flex flex-wrap justify-center">
|
<div class="flex flex-wrap justify-center">
|
||||||
{#if !filteredSources}
|
{#if !filteredSources}
|
||||||
<div class="flex-col">
|
<div class="flex-col">
|
||||||
|
@@ -644,7 +644,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{#if application.buildPack !== 'compose'}
|
{#if application.buildPack !== 'compose'}
|
||||||
<div class="title font-bold pb-3 pt-10 border-b border-coolgray-500 mb-6">
|
<div class="title font-bold pb-3 pt-10 border-b border-coolgray-500 mb-6">
|
||||||
Build & Deploy
|
Configuration
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-flow-row gap-2 px-4 pr-5">
|
<div class="grid grid-flow-row gap-2 px-4 pr-5">
|
||||||
{#if application.buildCommand || application.buildPack === 'rust' || application.buildPack === 'laravel'}
|
{#if application.buildCommand || application.buildPack === 'rust' || application.buildPack === 'laravel'}
|
||||||
|
Reference in New Issue
Block a user