Add env and port files

(adapted from windows branch)