I’m not using the dev docker env, so I can’t test it, but maybe this will work?
--- a/lib/backup_restore.rb
+++ b/lib/backup_restore.rb
@@ -135,7 +135,8 @@ module BackupRestore
DatabaseConfiguration.new(
config["backup_host"] || config["host"],
config["backup_port"] || config["port"],
- config["username"] || username || ENV["USER"] || "postgres",
+ config["username"] || username || ENV["USER"] || ENV["DISCOURSE_DEV_DB_USERNAME"] ||
+ "postgres",
config["password"] || password,
config["database"],
)
If it does, please create a PR.