exoframejs/exoframe

Keep the same UUID on Update Deploy, when using baseDomain on the server

socarlosb opened this issue ยท 2 comments

Sorry, couldn't find any open issue ๐Ÿ™„

Background:

On Exoframe server.config.yml file we add some base domain like baseDomain: .mydomain.com, this allows a user to use the command exoframe to deploy an app without specifying the URL, it creates an URL like exo-{exoframe-user}-{app-folder-name}-{random UUID}.mydomain.com. Every time the user runs the command exoframe, or exoframe -u, the URL will change with a new UUID.

Issue:

When using DevOps, aka automatic deploy, the user doesn't have an easy way to know the URL that will be generated.

Possible Solution:

When a user uses the exoframe, a new URL will be created with a random UUID, after when the user uses the command exoframe -u flag, keep the same URL!

IMHO it would be nice to have a "sticky" domain. The procedure for deploys could then be as following:

  1. server generates a uuid on the first deploy
  2. uuid / project name will be saved to a local folder. (Something like .exoframe/config.json or simply by extending the current config file exoframe.json. I would probalby prefer saving it into a new folder like .exoframe/ to prevent commiting the deployed id to git, so the ci would create its own uuid.
  3. exoframe-cli detects current uuid and the normal deploy will be an update request

PS: Maybe this way shortening the url to {app-folder-name}-{random UUID}.mydomain.com would be nice aswell.

v7 will use {config.name}.{baseDomain} format, so URLs will be deterministic.