cli/server.go currently performs server initialization in a largely linear sequence with implicit dependencies between subsystems. As the Coder server has grown, this pattern has become harder to reason about and maintain.
Ideally we create a services DAG for startup & shutdown in the right order. A DI framework can be passed around for services to reference each other.