BritishYouthBandAssociation / OrgAdmin

Admin site for organisations
1 stars 0 forks source link

Automated Development Publish #255

Closed rugulous closed 1 year ago

rugulous commented 1 year ago

We now have a separate development branch (and associated site).

The thinking behind this is to give us a testing area, and to share our changes with others before they go live.

Currently, any publishes to the development sites are a manual job, which kind of defeats the purpose of this separate site.

We require some way for the DEVELOPMENT ONLY sites to automatically pick up changes and rebuild themselves

rugulous commented 1 year ago

The way we publish sites is relatively straightforward

When this site is published we run

git fetch
git pull
pm2 restart dev.admin.byba.online

When the Library is published it's slightly more complex as its tied to a few sites

git fetch
git pull
pm2 restart dev.api.byba.online
pm2 restart dev.assets.byba.online
pm2 restart dev.admin.byba.online

There is probably also some way to group these sites together, worth investigating. I know we could create separate dev and live users and then use pm2 restart all but I'm not sure if this is the right way to go

rugulous commented 1 year ago

I've configured a runner and a job to publish to dev - fingers crossed this resolves the issue :)

rugulous commented 1 year ago

I've added one to Library that restarts all the dev sites too

rugulous commented 1 year ago

Sam broke everything so I'm redoing this - but better

rugulous commented 1 year ago

I've now split out two servers (which, according to the Oracle cloud cost checker, should still fall under free use)

The DEV server has been bumped to 4GB of RAM and is now on an ARM64 processor. I've reinstalled the runner here

The LIVE server has been bumped even further and should have 18GB of RAM + 3 CPUs (?)

Due to the dev branch being in conflict with itself, I've nuked it, pulled a new one from main, and merged the outstanding changes I could see

rugulous commented 1 year ago

Doesn't work - for example see https://github.com/BritishYouthBandAssociation/OrgAdmin/actions/runs/4148642107/jobs/7176827321

rugulous commented 1 year ago

Relative paths!!!!!