Yes if you are deploying your app on a server you have full controll on. For example that is what I did with a VPS I have for a website. I installed myself postgresql then create a user, a database with a password and configured the Phoenix app to connect to that database.
With some other hosting solutions you won’t have to create the database database yourself. You can opt for a server with a pre-configured database and they will just give you all the needed informations.
So it depends on how you are deploying your apps.
Edit:
If your question is about wether you can use a single database for all environments (test, dev, prod), of course you can, but you don’t want to mix for example testing data with production data.
@geofflangenderfer I guess the answer is “deploy a PostgreSQL instance” / install PostgreSQL somewhere? Then you can create a new user and a database following the docs/tutorials on the internet.