mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-07 20:45:17 +00:00
fix(db): update database URL configuration for production and development environments
- Modified the database URL assignment logic to differentiate between production and development environments. - Ensured that the correct database URL is used based on the NODE_ENV variable, improving deployment flexibility.
This commit is contained in:
@@ -34,7 +34,12 @@ 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
|
||||||
`);
|
`);
|
||||||
// postgres://dokploy:amukds4wi9001583845717ad2@localhost:5432/dokploy
|
|
||||||
dbUrl =
|
if (process.env.NODE_ENV === "production") {
|
||||||
"postgres://dokploy:amukds4wi9001583845717ad2@dokploy-postgres:5432/dokploy";
|
dbUrl =
|
||||||
|
"postgres://dokploy:amukds4wi9001583845717ad2@dokploy-postgres:5432/dokploy";
|
||||||
|
} else {
|
||||||
|
dbUrl =
|
||||||
|
"postgres://dokploy:amukds4wi9001583845717ad2@localhost:5432/dokploy";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user