Closed isedwards closed 2 years ago
@isedwards
I do not understand Ansible much but I can look into it if we decide to use ansible for deployment.
But I looked into their repository and it seems to me that they are listening for dockerhub changes (for a few specific images) to trigger deployment process. And I think the services can be redeployed manually too. To follow their setup completely, I guess we have to publish our images to dockerhub as well.
On the other hand, we can have a separate server called api-latest.opencdms.org
or something else. And we can trigger deployment to this server on push to main
. To deploy on api.opencdms.org
(stable version), we can create a new branch prod
/stable
and trigger deployment on push to this branch. Or we could listen for release
event to deploy on api.opencdms.org
[ https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release ]
Please let me know what you think.
Yes, I think you are right - adopting the full complexity of the approach taken by demo.pygeoapi.io is probably not the best approach for now.
It we use two subdomains (api-stable
and api-latest
) would you recommend a second server - or should we deploy both on the same server?
If we deploy on the same server then would api.opencdms.org/stable
and api.opencdms.org/latest
be an option - or it this not sensible?
If we deploy on the same server then would
api.opencdms.org/stable
andapi.opencdms.org/latest
be an option - or it this not sensible?
I am not sure if fastapi can handle this kind of base url.
Resolved by #34 - currently using separate servers for api.opencdms.org
(stable) and api-latest.opencdms.org
(latest)
Currently, whenever we merge pull requests to the master branch in this repository, the live demo at
api.opencdms.org
will automatically update.Depending on the changes, there is a risk that this will break work being undertaken by front end developers.
opencdms-api
should adopt the same approach aspygeoapi
providing a landing page similar to demo.pygeoapi.io with end-points forlatest
andstable
.Can/should we do this with a fork of their
demo.pygeoapi.io
GitHub repository and would our fork diverge substantially/completely? Would there be disadvantages to using ansible as they have?