More finetuning in project setup

- This is not final and expect to change more,
  but currently have separate ENV vars for test,
  development and production.

- Use correct PORTs for server and db by checking
  set ENV vars.