\$c<\\/div>/
+ ' /app/ui/build/index.html
+ fi
+fi
+
# Ensure proper ownership of data directory
echo "Setting up data directory permissions..."
mkdir -p /databasus-data/pgdata
@@ -439,7 +459,7 @@ fi
echo "Setting up database and user..."
gosu postgres \$PG_BIN/psql -p 5437 -h localhost -d postgres << 'SQL'
-# We use stub password, because internal DB is not exposed outside container
+-- We use stub password, because internal DB is not exposed outside container
ALTER USER postgres WITH PASSWORD 'Q1234567';
SELECT 'CREATE DATABASE databasus OWNER postgres'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'databasus')
diff --git a/backend/internal/features/backups/backups/usecases/mariadb/create_backup_uc.go b/backend/internal/features/backups/backups/usecases/mariadb/create_backup_uc.go
index 79ae639..ddccf62 100644
--- a/backend/internal/features/backups/backups/usecases/mariadb/create_backup_uc.go
+++ b/backend/internal/features/backups/backups/usecases/mariadb/create_backup_uc.go
@@ -109,6 +109,7 @@ func (uc *CreateMariadbBackupUsecase) buildMariadbDumpArgs(
"--routines",
"--quick",
"--skip-extended-insert",
+ "--skip-add-locks",
"--verbose",
}
@@ -129,6 +130,8 @@ func (uc *CreateMariadbBackupUsecase) buildMariadbDumpArgs(
if mdb.IsHttps {
args = append(args, "--ssl")
args = append(args, "--skip-ssl-verify-server-cert")
+ } else {
+ args = append(args, "--skip-ssl")
}
if mdb.Database != nil && *mdb.Database != "" {
diff --git a/backend/internal/features/backups/backups/usecases/mysql/create_backup_uc.go b/backend/internal/features/backups/backups/usecases/mysql/create_backup_uc.go
index 0163f40..5dca193 100644
--- a/backend/internal/features/backups/backups/usecases/mysql/create_backup_uc.go
+++ b/backend/internal/features/backups/backups/usecases/mysql/create_backup_uc.go
@@ -108,6 +108,7 @@ func (uc *CreateMysqlBackupUsecase) buildMysqldumpArgs(my *mysqltypes.MysqlDatab
"--set-gtid-purged=OFF",
"--quick",
"--skip-extended-insert",
+ "--skip-add-locks",
"--verbose",
}
@@ -126,6 +127,8 @@ func (uc *CreateMysqlBackupUsecase) buildMysqldumpArgs(my *mysqltypes.MysqlDatab
if my.IsHttps {
args = append(args, "--ssl-mode=REQUIRED")
+ } else {
+ args = append(args, "--ssl-mode=DISABLED")
}
if my.Database != nil && *my.Database != "" {
@@ -326,6 +329,8 @@ port=%d
if myConfig.IsHttps {
content += "ssl-mode=REQUIRED\n"
+ } else {
+ content += "ssl-mode=DISABLED\n"
}
err = os.WriteFile(myCnfFile, []byte(content), 0o600)
diff --git a/backend/internal/features/restores/usecases/mariadb/restore_backup_uc.go b/backend/internal/features/restores/usecases/mariadb/restore_backup_uc.go
index 9996e93..059e536 100644
--- a/backend/internal/features/restores/usecases/mariadb/restore_backup_uc.go
+++ b/backend/internal/features/restores/usecases/mariadb/restore_backup_uc.go
@@ -77,6 +77,8 @@ func (uc *RestoreMariadbBackupUsecase) Execute(
if mdb.IsHttps {
args = append(args, "--ssl")
args = append(args, "--skip-ssl-verify-server-cert")
+ } else {
+ args = append(args, "--skip-ssl")
}
if mdb.Database != nil && *mdb.Database != "" {
diff --git a/backend/internal/features/restores/usecases/mysql/restore_backup_uc.go b/backend/internal/features/restores/usecases/mysql/restore_backup_uc.go
index 46680ad..f0682fe 100644
--- a/backend/internal/features/restores/usecases/mysql/restore_backup_uc.go
+++ b/backend/internal/features/restores/usecases/mysql/restore_backup_uc.go
@@ -76,6 +76,8 @@ func (uc *RestoreMysqlBackupUsecase) Execute(
if my.IsHttps {
args = append(args, "--ssl-mode=REQUIRED")
+ } else {
+ args = append(args, "--ssl-mode=DISABLED")
}
if my.Database != nil && *my.Database != "" {
@@ -305,6 +307,8 @@ port=%d
if myConfig.IsHttps {
content += "ssl-mode=REQUIRED\n"
+ } else {
+ content += "ssl-mode=DISABLED\n"
}
err = os.WriteFile(myCnfFile, []byte(content), 0o600)
diff --git a/frontend/cloud-root-content.html b/frontend/cloud-root-content.html
new file mode 100644
index 0000000..0dcb97f
--- /dev/null
+++ b/frontend/cloud-root-content.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
Sign in
+
+
Your email
+
+
+
Password
+
+
+
+ Sign in
+
+
+
+
+
+
diff --git a/frontend/src/features/playground/index.ts b/frontend/src/features/playground/index.ts
deleted file mode 100644
index 428cd8e..0000000
--- a/frontend/src/features/playground/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { PlaygroundWarningComponent } from './ui/PlaygroundWarningComponent';
diff --git a/frontend/src/features/playground/ui/PlaygroundWarningComponent.tsx b/frontend/src/features/playground/ui/PlaygroundWarningComponent.tsx
deleted file mode 100644
index 23d6ed4..0000000
--- a/frontend/src/features/playground/ui/PlaygroundWarningComponent.tsx
+++ /dev/null
@@ -1,149 +0,0 @@
-import { Modal } from 'antd';
-import type { JSX } from 'react';
-import { useEffect, useState } from 'react';
-
-import { IS_CLOUD } from '../../../constants';
-
-const STORAGE_KEY = 'databasus_playground_info_dismissed';
-
-const TIMEOUT_SECONDS = 30;
-
-export const PlaygroundWarningComponent = (): JSX.Element => {
- const [isVisible, setIsVisible] = useState(false);
- const [remainingSeconds, setRemainingSeconds] = useState(TIMEOUT_SECONDS);
- const [isButtonEnabled, setIsButtonEnabled] = useState(false);
-
- const handleClose = () => {
- try {
- localStorage.setItem(STORAGE_KEY, 'true');
- } catch (e) {
- console.warn('Failed to save playground modal state to localStorage:', e);
- }
- setIsVisible(false);
- };
-
- useEffect(() => {
- if (!IS_CLOUD) {
- return;
- }
-
- try {
- const isDismissed = localStorage.getItem(STORAGE_KEY) === 'true';
- if (!isDismissed) {
- setIsVisible(true);
- }
- } catch (e) {
- console.warn('Failed to read playground modal state from localStorage:', e);
- setIsVisible(true);
- }
- }, []);
-
- useEffect(() => {
- if (!isVisible) {
- return;
- }
-
- const interval = setInterval(() => {
- setRemainingSeconds((prev) => {
- if (prev <= 1) {
- setIsButtonEnabled(true);
- clearInterval(interval);
- return 0;
- }
- return prev - 1;
- });
- }, 1000);
-
- return () => clearInterval(interval);
- }, [isVisible]);
-
- return (
-
- {isButtonEnabled ? 'Understood' : `${remainingSeconds}`}
-
- }
- okButtonProps={{ disabled: !isButtonEnabled }}
- closable={false}
- cancelButtonProps={{ style: { display: 'none' } }}
- width={500}
- centered
- maskClosable={false}
- >
-
-
-
What is Playground?
-
- Playground is a dev environment of Databasus development team. It is used by Databasus
- dev team to test new features and see issues which hard to detect when using self hosted
- (without logs or reports).{' '}
- Here you can make backups for small and not critical databases for free
-
-
-
-
-
What is limit?
-
- Single backup size - 100 MB (~1.5 GB database)
- Store period - 7 days
-
-
-
-
-
Is it secure?
-
- Yes, it's regular Databasus installation, secured and maintained by Databasus team.
- More about security{' '}
-
- you can read here
-
-
-
-
-
-
Can my data be currepted?
-
- No, because playground use only read-only users and cannot affect your DB. Only issue
- you can face is instability: playground background workers frequently reloaded so backup
- can be slower or be restarted due to app restart. Do not rely production DBs on
- playground, please. At once we may clean backups or something like this. At least, check
- your backups here once a week
-
-
-
-
-
-
- );
-};
diff --git a/frontend/src/features/users/ui/SignInComponent.tsx b/frontend/src/features/users/ui/SignInComponent.tsx
index 3e4a2a3..5c35431 100644
--- a/frontend/src/features/users/ui/SignInComponent.tsx
+++ b/frontend/src/features/users/ui/SignInComponent.tsx
@@ -166,6 +166,8 @@ export function SignInComponent({
)}