mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-11 22:45:18 +00:00
fix(db): update deprecation warning for legacy database credentials
- Added a condition to display the deprecation warning for legacy database credentials only in non-test environments. - This change prevents unnecessary warnings during testing, improving the developer experience.
This commit is contained in:
@@ -26,7 +26,8 @@ if (DATABASE_URL) {
|
|||||||
password,
|
password,
|
||||||
)}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}`;
|
)}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}`;
|
||||||
} else {
|
} else {
|
||||||
console.warn(`
|
if (process.env.NODE_ENV !== "test") {
|
||||||
|
console.warn(`
|
||||||
⚠️ [DEPRECATED DATABASE CONFIG]
|
⚠️ [DEPRECATED DATABASE CONFIG]
|
||||||
You are using the legacy hardcoded database credentials.
|
You are using the legacy hardcoded database credentials.
|
||||||
This mode WILL BE REMOVED in a future release.
|
This mode WILL BE REMOVED in a future release.
|
||||||
@@ -34,6 +35,7 @@ if (DATABASE_URL) {
|
|||||||
Please migrate to Docker Secrets using POSTGRES_PASSWORD_FILE.
|
Please migrate to Docker Secrets using POSTGRES_PASSWORD_FILE.
|
||||||
Please execute this command in your server: curl -sSL https://dokploy.com/security/0.26.6.sh | bash
|
Please execute this command in your server: curl -sSL https://dokploy.com/security/0.26.6.sh | bash
|
||||||
`);
|
`);
|
||||||
|
}
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "production") {
|
if (process.env.NODE_ENV === "production") {
|
||||||
dbUrl =
|
dbUrl =
|
||||||
|
|||||||
Reference in New Issue
Block a user