diff --git a/apps/api/src/index.ts b/apps/api/src/index.ts index 979099db1..4b71f70d8 100644 --- a/apps/api/src/index.ts +++ b/apps/api/src/index.ts @@ -16,9 +16,9 @@ declare module 'fastify' { COOLIFY_DATABASE_URL: string, COOLIFY_SENTRY_DSN: string, COOLIFY_IS_ON: string, - COOLIFY_WHITE_LABELED: boolean, + COOLIFY_WHITE_LABELED: string, COOLIFY_WHITE_LABELED_ICON: string | null, - COOLIFY_AUTO_UPDATE: boolean, + COOLIFY_AUTO_UPDATE: string, }; } } diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.ts index 87cb6ad98..ca1caa697 100644 --- a/apps/api/src/lib/common.ts +++ b/apps/api/src/lib/common.ts @@ -17,7 +17,7 @@ import { checkContainer, removeContainer } from './docker'; import { day } from './dayjs'; import * as serviceFields from './serviceFields' -export const version = '3.2.1'; +export const version = '3.2.2'; export const isDev = process.env.NODE_ENV === 'development'; const algorithm = 'aes-256-ctr'; diff --git a/apps/api/src/routes/api/v1/destinations/handlers.ts b/apps/api/src/routes/api/v1/destinations/handlers.ts index 3966ecab9..f310f8a61 100644 --- a/apps/api/src/routes/api/v1/destinations/handlers.ts +++ b/apps/api/src/routes/api/v1/destinations/handlers.ts @@ -60,7 +60,7 @@ export async function getDestination(request: FastifyRequest) { throw { status: 404, message: `Destination not found.` }; } const settings = await listSettings(); - let payload = { + const payload = { destination, settings }; @@ -218,7 +218,11 @@ export async function verifyRemoteDockerEngine(request: FastifyRequest, reply: F if (!stdout) { await asyncExecShell(`DOCKER_HOST=${host} docker network create --attachable ${network}`); } + const { stdout:coolifyNetwork } = await asyncExecShell(`DOCKER_HOST=${host} docker network ls --filter 'name=coolify-infra' --no-trunc --format "{{json .}}"`); + if (!coolifyNetwork) { + await asyncExecShell(`DOCKER_HOST=${host} docker network create --attachable coolify-infra`); + } await prisma.destinationDocker.update({ where: { id }, data: { remoteVerified: true } }) return reply.code(201).send() diff --git a/package.json b/package.json index 281b919b8..6127427d4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "3.2.1", + "version": "3.2.2", "license": "Apache-2.0", "repository": "github:coollabsio/coolify", "scripts": {