1- Explicitly define your app's environment with the Boxfile (https://docs.nanobox.io/getting-started/boxfile/)
2- Write your own engine that will actually setup the environment (https://desktop.nanobox.io/engine-dev/).