Production deployment of Star Drive. Contains the python code, and complied js scripts from angular.
Go to file
Dan c884fedcea update 2022-02-09 09:47:59 -05:00
backend v1.17 2021-10-04 13:32:39 -04:00
db_backup_scripts remove line from start of pg_backup_rotated.sh that was preventing the backups from running 2020-02-27 11:11:18 -05:00
frontend update 2022-02-09 09:47:59 -05:00
.gitignore Useful database backup scripts. 2019-10-03 14:30:33 -04:00
.release-it.json initial release 2019-10-02 00:33:19 -04:00
README.md 1.15 release 2021-07-09 09:51:14 -04:00
package-lock.json initial release 2019-10-02 00:33:19 -04:00
prepare_for_deploy.sh latest deployment. 2019-10-07 11:32:53 -04:00

README.md

This is terrible crap. It should be a docker container, or at least a set of shell scripts. We can't install docker on the servers at UVA currently. So we deploy to production by pushing to this star-drive-dist directory, and then pulling from these repos on production. Potentially running some flask commands if required.

Release-It

We are using Release-It to manage pushing code that can be easily deployed to staging and production. You can read more about the project here: https://www.npmjs.com/package/release-it

I'll bet you skimmed that quick! I'll bet you didn't read it carefully! It took me at least 5 re-reads, so let me tell you the important bit, and save you some time. At a minimum, you will need to follow these directions to set up your local environment to handle github releases: https://www.npmjs.com/package/release-it#github-releases

Once Release-it is installed and you have a github token setup per those instructions, use it to create a tag.

But I am actually am a pain.

for instance, I expect that beside this directory, you have checked out the star-drive repository, and called it star-drive.

Say you took some steps like:

  • cd ../star-drive
  • cd frontend
  • ng build --prod -c production

That would create a whole pile of cool, pre-complied, ready to deploy angular wonder, that is darn near ready for production. But Wait! There is more!

If you did that, then you can run these commands that will set up this star-drive dist:

rm -rf backend
rm -rf frontend
cp -r ../star-drive/frontend/dist/star-drive/ frontend/
cp -r ../star-drive/backend backend
rm -rf backend/python-env
rm -rf backend/__pycache__/
git add backend
git add frontend