fix: heroku bp
This commit is contained in:
parent
2e713b459e
commit
f863b42b71
@ -480,7 +480,6 @@ export const saveBuildLog = async ({
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
if (isDev) return
|
||||
return await prisma.buildLog.create({
|
||||
data: {
|
||||
line: addTimestamp, buildId, time: Number(day().valueOf()), applicationId
|
||||
|
@ -2,13 +2,14 @@ import { executeDockerCmd, prisma } from "../common"
|
||||
import { saveBuildLog } from "./common";
|
||||
|
||||
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 {
|
||||
await saveBuildLog({ line: `Building image started.`, buildId, applicationId });
|
||||
await executeDockerCmd({
|
||||
buildId,
|
||||
debug,
|
||||
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 });
|
||||
} catch (error) {
|
||||
|
@ -523,9 +523,7 @@ export async function traefikConfiguration(request, reply) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
...traefik
|
||||
}
|
||||
|
||||
const { fqdn, dualCerts } = await prisma.setting.findFirst();
|
||||
if (fqdn) {
|
||||
const domain = getDomain(fqdn);
|
||||
@ -546,30 +544,30 @@ export async function traefikConfiguration(request, reply) {
|
||||
for (const application of data.applications) {
|
||||
configureMiddleware(application, traefik);
|
||||
}
|
||||
for (const service of data.services) {
|
||||
const { id, scriptName } = service;
|
||||
// for (const service of data.services) {
|
||||
// const { id, scriptName } = service;
|
||||
|
||||
configureMiddleware(service, traefik);
|
||||
if (service.type === 'minio') {
|
||||
service.id = id + '-minio';
|
||||
service.container = id;
|
||||
service.domain = service.otherDomain;
|
||||
service.nakedDomain = service.otherNakedDomain;
|
||||
service.isHttps = service.otherIsHttps;
|
||||
service.isWWW = service.otherIsWWW;
|
||||
service.port = 9000;
|
||||
configureMiddleware(service, traefik);
|
||||
}
|
||||
// configureMiddleware(service, traefik);
|
||||
// if (service.type === 'minio') {
|
||||
// service.id = id + '-minio';
|
||||
// service.container = id;
|
||||
// service.domain = service.otherDomain;
|
||||
// service.nakedDomain = service.otherNakedDomain;
|
||||
// service.isHttps = service.otherIsHttps;
|
||||
// service.isWWW = service.otherIsWWW;
|
||||
// service.port = 9000;
|
||||
// configureMiddleware(service, traefik);
|
||||
// }
|
||||
|
||||
if (scriptName) {
|
||||
traefik.http.middlewares[`${id}-redir`] = {
|
||||
replacepathregex: {
|
||||
regex: `/js/${scriptName}`,
|
||||
replacement: '/js/plausible.js'
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
// if (scriptName) {
|
||||
// traefik.http.middlewares[`${id}-redir`] = {
|
||||
// replacepathregex: {
|
||||
// regex: `/js/${scriptName}`,
|
||||
// replacement: '/js/plausible.js'
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
for (const coolify of data.coolify) {
|
||||
configureMiddleware(coolify, traefik);
|
||||
}
|
||||
|
@ -86,7 +86,7 @@
|
||||
<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"
|
||||
/>
|
||||
</svg>Build & Deploy</a
|
||||
</svg>Configuration</a
|
||||
>
|
||||
</li>
|
||||
<li
|
||||
|
@ -415,15 +415,14 @@
|
||||
</button>
|
||||
{/if}
|
||||
<button
|
||||
class="btn btn-sm btn-ghost gap-2"
|
||||
class:btn-primary={$status.application.overallStatus !== 'degraded'}
|
||||
class="btn btn-sm gap-2"
|
||||
disabled={!$isDeploymentEnabled}
|
||||
on:click={() => handleDeploySubmit(false)}
|
||||
>
|
||||
{#if $status.application.overallStatus !== 'degraded'}
|
||||
<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"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
|
@ -68,7 +68,9 @@
|
||||
</script>
|
||||
|
||||
<div class="max-w-screen-2xl mx-auto px-9">
|
||||
<div class="title pb-8">Git App</div>
|
||||
{#if !filteredSources}
|
||||
<div class="title pb-8">Git App</div>
|
||||
{/if}
|
||||
<div class="flex flex-wrap justify-center">
|
||||
{#if !filteredSources}
|
||||
<div class="flex-col">
|
||||
|
@ -644,7 +644,7 @@
|
||||
</div>
|
||||
{#if application.buildPack !== 'compose'}
|
||||
<div class="title font-bold pb-3 pt-10 border-b border-coolgray-500 mb-6">
|
||||
Build & Deploy
|
||||
Configuration
|
||||
</div>
|
||||
<div class="grid grid-flow-row gap-2 px-4 pr-5">
|
||||
{#if application.buildCommand || application.buildPack === 'rust' || application.buildPack === 'laravel'}
|
||||
|
Loading…
x
Reference in New Issue
Block a user