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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: root user for dbs on arm
Andras Bacsaia70adc5eb3d8
diff --git a/apps/api/src/routes/api/v1/base/index.ts b/apps/api/src/routes/api/v1/base/index.tsindex 170a138f3c..d631df3d80 100644--- a/apps/api/src/routes/api/v1/base/index.ts+++ b/apps/api/src/routes/api/v1/base/index.ts@@ -1,31 +1,31 @@import { FastifyPluginAsync } from 'fastify';-import { errorHandler, listSettings, version } from '../../../../lib/common';+import { errorHandler, isARM, listSettings, version } from '../../../../lib/common';const root: FastifyPluginAsync = async (fastify): Promise<void> => {- fastify.addHook('onRequest', async (request) => {- try {- await request.jwtVerify()- } catch(error) {- return- }- });- fastify.get('/', async (request) => {- const teamId = request.user?.teamId;- const settings = await listSettings()- try {- return {- ipv4: teamId ? settings.ipv4 : null,- ipv6: teamId ? settings.ipv6 : null,- version,- whiteLabeled: process.env.COOLIFY_WHITE_LABELED === 'true',- whiteLabeledIcon: process.env.COOLIFY_WHITE_LABELED_ICON,- isRegistrationEnabled: settings.isRegistrationEnabled,- }- } catch ({ status, message }) {- return errorHandler({ status, message })- }- });-+ fastify.addHook('onRequest', async (request) => {+ try {+ await request.jwtVerify();+ } catch (error) {+ return;+ }+ });+ fastify.get('/', async (request) => {+ const teamId = request.user?.teamId;+ const settings = await listSettings();+ try {+ return {+ ipv4: teamId ? settings.ipv4 : null,+ ipv6: teamId ? settings.ipv6 : null,+ version,+ whiteLabeled: process.env.COOLIFY_WHITE_LABELED === 'true',+ whiteLabeledIcon: process.env.COOLIFY_WHITE_LABELED_ICON,+ isRegistrationEnabled: settings.isRegistrationEnabled,+ isARM: isARM(process.arch)+ };+ } catch ({ status, message }) {+ return errorHandler({ status, message });+ }+ });};export default root;diff --git a/apps/ui/src/lib/store.ts b/apps/ui/src/lib/store.tsindex f779eb1dc2..493896c70e 100644--- a/apps/ui/src/lib/store.ts+++ b/apps/ui/src/lib/store.ts@@ -23,7 +23,8 @@ interface AppSession {github: string | null,gitlab: string | null,},- pendingInvitations: Array<any>+ pendingInvitations: Array<any>,+ isARM: boolean}interface AddToast {type?: "info" | "success" | "error",@@ -52,7 +53,8 @@ export const appSession: Writable<AppSession> = writable({github: null,gitlab: null},- pendingInvitations: []+ pendingInvitations: [],+ isARM: false});export const disabledButton: Writable<boolean> = writable(false);export const isDeploymentEnabled: Writable<boolean> = writable(false);diff --git a/apps/ui/src/routes/__layout.svelte b/apps/ui/src/routes/__layout.svelteindex f9c41a702b..d71367a6c3 100644--- a/apps/ui/src/routes/__layout.svelte+++ b/apps/ui/src/routes/__layout.svelte@@ -75,6 +75,7 @@$appSession.version = baseSettings.version;$appSession.whiteLabeled = baseSettings.whiteLabeled;$appSession.whiteLabeledDetails.icon = baseSettings.whiteLabeledIcon;+ $appSession.isARM = baseSettings.isARM;$appSession.pendingInvitations = pendingInvitations;diff --git a/apps/ui/src/routes/databases/[id]/_Databases/_MySQL.svelte b/apps/ui/src/routes/databases/[id]/_Databases/_MySQL.svelteindex 886f1cbd24..5bd94fd853 100644--- a/apps/ui/src/routes/databases/[id]/_Databases/_MySQL.svelte+++ b/apps/ui/src/routes/databases/[id]/_Databases/_MySQL.svelte@@ -1,6 +1,6 @@<script lang="ts">export let database: any;- import { status } from '$lib/store';+ import { status, appSession } from '$lib/store';import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';import { t } from '$lib/translations';import Explainer from '$lib/components/Explainer.svelte';@@ -56,7 +56,7 @@placeholder={$t('forms.generated_automatically_after_start')}id="rootUser"name="rootUser"- value={database.rootUser}+ value={$appSession.isARM ? 'root' : database.rootUser}/></div><div class="grid grid-cols-2 items-center">diff --git a/apps/ui/src/routes/databases/[id]/_Databases/_PostgreSQL.svelte b/apps/ui/src/routes/databases/[id]/_Databases/_PostgreSQL.svelteindex c1112a54cb..d0a1d56245 100644--- a/apps/ui/src/routes/databases/[id]/_Databases/_PostgreSQL.svelte+++ b/apps/ui/src/routes/databases/[id]/_Databases/_PostgreSQL.svelte@@ -1,6 +1,6 @@<script lang="ts">export let database: any;- import { status } from '$lib/store';+ import { status, appSession } from '$lib/store';import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';import { t } from '$lib/translations';import Explainer from '$lib/components/Explainer.svelte';@@ -22,22 +22,24 @@bind:value={database.defaultDatabase}/></div>- <div class="grid grid-cols-2 items-center">- <label for="rootUser"- >Postgres User Password <Explainer- explanation="Could be changed while the database is running."- /></label- >- <CopyPasswordField- disabled={!$status.database.isRunning}- readonly={!$status.database.isRunning}- placeholder="Generated automatically after start"- isPasswordField- id="rootUserPassword"- name="rootUserPassword"- bind:value={database.rootUserPassword}- />- </div>+ {#if !$appSession.isARM}+ <div class="grid grid-cols-2 items-center">+ <label for="rootUser"+ >Postgres User Password <Explainer+ explanation="Could be changed while the database is running."+ /></label+ >+ <CopyPasswordField+ disabled={!$status.database.isRunning}+ readonly={!$status.database.isRunning}+ placeholder="Generated automatically after start"+ isPasswordField+ id="rootUserPassword"+ name="rootUserPassword"+ bind:value={database.rootUserPassword}+ />+ </div>+ {/if}<div class="grid grid-cols-2 items-center"><label for="dbUser">{$t('forms.user')}</label><CopyPasswordField