Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: add buildkit features

Andras Bacsai8eb9ca0260d5
diff --git a/apps/api/src/routes/api/v1/destinations/handlers.ts b/apps/api/src/routes/api/v1/destinations/handlers.ts
index 83373edd82..729426b2ef 100644
--- a/apps/api/src/routes/api/v1/destinations/handlers.ts
+++ b/apps/api/src/routes/api/v1/destinations/handlers.ts
@@ -218,20 +218,34 @@ export async function verifyRemoteDockerEngineFn(id: string) {
const { stdout: daemonJson } = await executeSSHCmd({ dockerId: id, command: `cat /etc/docker/daemon.json` });
try {
let daemonJsonParsed = JSON.parse(daemonJson);
+ let isUpdated = false;
if (!daemonJsonParsed['live-restore'] || daemonJsonParsed['live-restore'] !== true) {
+ isUpdated = true;
daemonJsonParsed['live-restore'] = true
+
+ }
+ if (!daemonJsonParsed?.features?.buildkit) {
+ isUpdated = true;
+ daemonJsonParsed.features = {
+ buildkit: true
+ }
+ }
+ if (isUpdated) {
await executeSSHCmd({ dockerId: id, command: `echo '${JSON.stringify(daemonJsonParsed)}' > /etc/docker/daemon.json` });
await executeSSHCmd({ dockerId: id, command: `systemctl restart docker` });
}
} catch (error) {
const daemonJsonParsed = {
- "live-restore": true
+ "live-restore": true,
+ "features": {
+ "buildkit": true
+ }
}
- console.log(JSON.stringify(daemonJsonParsed))
await executeSSHCmd({ dockerId: id, command: `echo '${JSON.stringify(daemonJsonParsed)}' > /etc/docker/daemon.json` });
await executeSSHCmd({ dockerId: id, command: `systemctl restart docker` });
+ } finally {
+ await prisma.destinationDocker.update({ where: { id }, data: { remoteVerified: true } })
}
- await prisma.destinationDocker.update({ where: { id }, data: { remoteVerified: true } })
}
export async function verifyRemoteDockerEngine(request: FastifyRequest<OnlyId>, reply: FastifyReply) {
const { id } = request.params;