overthesun / simoc

A scalable model of an interactive, off-world community
https://ngs.simoc.space/
GNU General Public License v3.0
2 stars 1 forks source link

Pass the number of celery workers from the workflow #365

Closed ezio-melotti closed 1 year ago

ezio-melotti commented 1 year ago

This should fix the number of celery containers on beta by passing the number of workers from the workflow.

ezio-melotti commented 1 year ago

I created #369 as a better solution to this problem, but it requires a more recent version of docker-compose than the one currently installed on beta, so in the meanwhile I fixed this PR.

The problem was that this PR was trying to access the $CELERY_WORKER and $FLASK_WORKER vars set in a previous workflow step by source simoc_beta.env, however the env of each step is separate, so the variables were not available.

In order to fix it, I copied the envvars into $GITHUB_ENV to make them available in the following steps.

I was able to successfully deploy on beta and verify that the scaling worked, which means that until we update docker-compose and merge #369, this branch now offers a reliable way of redeploying on beta.

ezio-melotti commented 1 year ago

Let's merge this while we wait for docker-compose to be updated.