Keep in mind that you might also be able (and need to in case of Docker) to load the password using environment variables. So I have this in my config (so docker-compose can set the password).
if { $database eq "oracle" } {
set db_password           "mysitepassword"
} else {
set db_host               postgres
set db_port               ""
set db_user               $server
if {[info exists ::env(POSTGRES_PASSWORD)]} {
   set db_password $::env(POSTGRES_PASSWORD)
} else {
   set db_password           testing
}
}
As you can see the host is names postgres (which is the default name of my container in docker compose), but I am still in the learning process 😊.