Database passwords can be shared via docker secrets, which are file based. It should be possible to pass data in this way.