dglazkov / polymath

MIT License
133 stars 9 forks source link

Make managing deploying multiple endpoints easier #65

Open jkomoros opened 1 year ago

jkomoros commented 1 year ago

If you maintain only a single endpoint, it's easy: just put your libraries directly in libraries/ and put any other libraries you have access to that you want to be able to use locally but don't want to deploy in third_party.

However, if you maintain multiple endpoints, it can be finicky to make sure the layout of your libraries folder is updated for each deploy, and that you've set the right gcloud project.

It could be something like a convention for your libraries folder:

/endpoints
  /gcp-project-id-1
    library1.json
  /gcp-project-id-2
    /access
      /unpublished
        private-library2.json

And then a deploy script that goes through the libraries folder. for each sub-folder in libraries/endpoints it sets the GCP project ID, twiddles some value (perhaps .gcloudignore, or moving directories around) to prevent the other things from being uploaded, and then uploads each one.

jkomoros commented 1 year ago

The mechanism will also need a way to handle fiddling around with which host.SECRET.json to use

jkomoros commented 1 year ago

This can just be skipped if we move to polymath not being a monorepo; everyone can just keep multiple checkouts for multiple hosts