There are some contexts in which it could be helpful to re-use things that are defined in stac_fastapi.pgstac.app (e.g. developmentseed/eoapi-cdk#128), but that is not currently possible unless you have the POSTGRES_* environment variables set.
Rather than failing so early it might be more useful to fail when the application attempts to connect to the database.