added a local and production configs, factorises some common settings