build base URL based on deployment environment.