diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 64c664a9e..25e97c31a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,7 +20,8 @@ "svelte.svelte-vscode", "ardenivanov.svelte-intellisense", "Prisma.prisma", - "bradlc.vscode-tailwindcss" + "bradlc.vscode-tailwindcss", + "waderyan.gitblame" ], // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [3000, 3001], diff --git a/apps/api/prisma/seed.js b/apps/api/prisma/seed.js index 9fa55136f..eeb41b253 100644 --- a/apps/api/prisma/seed.js +++ b/apps/api/prisma/seed.js @@ -17,7 +17,6 @@ const algorithm = 'aes-256-ctr'; async function main() { // Enable registration for the first user - // Set initial HAProxy password const settingsFound = await prisma.setting.findFirst({}); if (!settingsFound) { await prisma.setting.create({ @@ -25,7 +24,8 @@ async function main() { isRegistrationEnabled: true, proxyPassword: encrypt(generatePassword()), proxyUser: cuid(), - arch: process.arch + arch: process.arch, + DNSServers: '1.1.1.1,8.8.8.8' } }); } else { diff --git a/apps/api/src/lib/buildPacks/common.ts b/apps/api/src/lib/buildPacks/common.ts index b6e57f52c..93b8ca076 100644 --- a/apps/api/src/lib/buildPacks/common.ts +++ b/apps/api/src/lib/buildPacks/common.ts @@ -89,6 +89,22 @@ export function setDefaultBaseImage(buildPack: string | null, deploymentType: st } ]; const phpVersions = [ + { + value: 'webdevops/php-apache:8.2', + label: 'webdevops/php-apache:8.2' + }, + { + value: 'webdevops/php-nginx:8.2', + label: 'webdevops/php-nginx:8.2' + }, + { + value: 'webdevops/php-apache:8.1', + label: 'webdevops/php-apache:8.1' + }, + { + value: 'webdevops/php-nginx:8.1', + label: 'webdevops/php-nginx:8.1' + }, { value: 'webdevops/php-apache:8.0', label: 'webdevops/php-apache:8.0' @@ -145,6 +161,22 @@ export function setDefaultBaseImage(buildPack: string | null, deploymentType: st value: 'webdevops/php-nginx:5.6', label: 'webdevops/php-nginx:5.6' }, + { + value: 'webdevops/php-apache:8.2-alpine', + label: 'webdevops/php-apache:8.2-alpine' + }, + { + value: 'webdevops/php-nginx:8.2-alpine', + label: 'webdevops/php-nginx:8.2-alpine' + }, + { + value: 'webdevops/php-apache:8.1-alpine', + label: 'webdevops/php-apache:8.1-alpine' + }, + { + value: 'webdevops/php-nginx:8.1-alpine', + label: 'webdevops/php-nginx:8.1-alpine' + }, { value: 'webdevops/php-apache:8.0-alpine', label: 'webdevops/php-apache:8.0-alpine' @@ -305,11 +337,11 @@ export function setDefaultBaseImage(buildPack: string | null, deploymentType: st payload.baseImage = 'denoland/deno:latest'; } if (buildPack === 'php') { - payload.baseImage = 'webdevops/php-apache:8.0-alpine'; + payload.baseImage = 'webdevops/php-apache:8.2-alpine'; payload.baseImages = phpVersions; } if (buildPack === 'laravel') { - payload.baseImage = 'webdevops/php-apache:8.0-alpine'; + payload.baseImage = 'webdevops/php-apache:8.2-alpine'; payload.baseBuildImage = 'node:18'; payload.baseBuildImages = nodeVersions; } diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.ts index 7d1ca3a9b..cba901255 100644 --- a/apps/api/src/lib/common.ts +++ b/apps/api/src/lib/common.ts @@ -21,7 +21,7 @@ import { scheduler } from './scheduler'; import { supportedServiceTypesAndVersions } from './services/supportedVersions'; import { includeServices } from './services/common'; -export const version = '3.9.1'; +export const version = '3.9.2'; export const isDev = process.env.NODE_ENV === 'development'; const algorithm = 'aes-256-ctr'; diff --git a/apps/api/src/lib/services/handlers.ts b/apps/api/src/lib/services/handlers.ts index d66747e67..f56657ce7 100644 --- a/apps/api/src/lib/services/handlers.ts +++ b/apps/api/src/lib/services/handlers.ts @@ -198,7 +198,7 @@ COPY ./init-db.sh /docker-entrypoint-initdb.d/init-db.sh`; await fs.writeFile(`${workdir}/Dockerfile`, Dockerfile); - const { volumeMounts } = persistentVolumes(id, persistentStorage, config.plausibleAnalytics) + const { volumeMounts } = persistentVolumes(id, persistentStorage, config) const composeFile: ComposeFile = { version: '3.8', @@ -333,6 +333,8 @@ async function startMinioService(request: FastifyRequest) { image: `${image}:${version}`, volumes: [`${id}-minio-data:/data`], environmentVariables: { + MINIO_SERVER_URL: fqdn, + MINIO_DOMAIN: getDomain(fqdn), MINIO_ROOT_USER: rootUser, MINIO_ROOT_PASSWORD: rootUserPassword, MINIO_BROWSER_REDIRECT_URL: fqdn @@ -852,7 +854,7 @@ async function startGhostService(request: FastifyRequest) { }); } - const { volumeMounts } = persistentVolumes(id, persistentStorage, config.ghost) + const { volumeMounts } = persistentVolumes(id, persistentStorage, config) const composeFile: ComposeFile = { version: '3.8', services: { @@ -1086,7 +1088,7 @@ async function startUmamiService(request: FastifyRequest) { FROM ${config.postgresql.image} COPY ./schema.postgresql.sql /docker-entrypoint-initdb.d/schema.postgresql.sql`; await fs.writeFile(`${workdir}/Dockerfile`, Dockerfile); - const { volumeMounts } = persistentVolumes(id, persistentStorage, config.umami) + const { volumeMounts } = persistentVolumes(id, persistentStorage, config) const composeFile: ComposeFile = { version: '3.8', services: { @@ -1114,6 +1116,7 @@ async function startUmamiService(request: FastifyRequest) { }, volumes: volumeMounts }; + console.log(composeFile) const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); await startServiceContainers(destinationDocker.id, composeFileDestination) @@ -1167,7 +1170,7 @@ async function startHasuraService(request: FastifyRequest) { }); } - const { volumeMounts } = persistentVolumes(id, persistentStorage, config.hasura) + const { volumeMounts } = persistentVolumes(id, persistentStorage, config) const composeFile: ComposeFile = { version: '3.8', services: { @@ -1272,7 +1275,7 @@ async function startFiderService(request: FastifyRequest) { config.fider.environmentVariables[secret.name] = secret.value; }); } - const { volumeMounts } = persistentVolumes(id, persistentStorage, config.fider) + const { volumeMounts } = persistentVolumes(id, persistentStorage, config) const composeFile: ComposeFile = { version: '3.8', services: { @@ -1880,7 +1883,7 @@ async function startMoodleService(request: FastifyRequest) { config.moodle.environmentVariables[secret.name] = secret.value; }); } - const { volumeMounts } = persistentVolumes(id, persistentStorage, config.moodle) + const { volumeMounts } = persistentVolumes(id, persistentStorage, config) const composeFile: ComposeFile = { version: '3.8', services: { @@ -2006,7 +2009,7 @@ async function startGlitchTipService(request: FastifyRequest) config.glitchTip.environmentVariables[secret.name] = secret.value; }); } - const { volumeMounts } = persistentVolumes(id, persistentStorage, config.glitchTip) + const { volumeMounts } = persistentVolumes(id, persistentStorage, config) const composeFile: ComposeFile = { version: '3.8', services: { @@ -2475,7 +2478,7 @@ async function startTaigaService(request: FastifyRequest) { TAIGA_SECRET_KEY: secretKey, } }, - + postgresql: { image: `postgres:12.3`, volumes: [`${id}-postgresql-data:/var/lib/postgresql/data`], diff --git a/apps/api/src/routes/api/v1/applications/handlers.ts b/apps/api/src/routes/api/v1/applications/handlers.ts index e37590381..1d00e94d1 100644 --- a/apps/api/src/routes/api/v1/applications/handlers.ts +++ b/apps/api/src/routes/api/v1/applications/handlers.ts @@ -525,9 +525,7 @@ export async function checkDomain(request: FastifyRequest) { } export async function checkDNS(request: FastifyRequest) { try { - const { id } = request.params - let { exposePort, fqdn, forceSave, dualCerts } = request.body if (!fqdn) { return {} diff --git a/apps/api/src/routes/webhooks/gitlab/handlers.ts b/apps/api/src/routes/webhooks/gitlab/handlers.ts index e661a29c5..58d01182a 100644 --- a/apps/api/src/routes/webhooks/gitlab/handlers.ts +++ b/apps/api/src/routes/webhooks/gitlab/handlers.ts @@ -133,7 +133,7 @@ export async function gitLabEvents(request: FastifyRequest) { await prisma.build.create({ data: { id: buildId, - pullmergeRequestId, + pullmergeRequestId: pullmergeRequestId.toString(), sourceBranch, applicationId: application.id, destinationDockerId: application.destinationDocker.id, diff --git a/apps/ui/src/routes/applications/[id]/__layout.svelte b/apps/ui/src/routes/applications/[id]/__layout.svelte index a9cd88482..0384dab28 100644 --- a/apps/ui/src/routes/applications/[id]/__layout.svelte +++ b/apps/ui/src/routes/applications/[id]/__layout.svelte @@ -244,7 +244,7 @@ {/if} {#if $status.application.initialLoading}