Page MenuHomePhabricator

Use `rsync` to synchronise uploaded repository with live site
Closed, ResolvedPublic5 Estimated Story Points

Description

Currently, our CI uses rm and cp to completely remove our live site and copy it over each time we deploy code (i.e. each merge to main). However, a possibly faster and more robust way is to use rsync to incrementally copy files after they have been sent to the server.

This will also eliminate the need to maintain a separate .env master file that is copied over in each deployment, and eliminate the risk of losing uploaded files (in case files uploaded are in the repo's "storage" directory)

Current behavior:
In the "Deploy code" step of our deply-app.yml github workflow, the live site is rmd and cp over into the tool account.

Expected Behaviour (AC):

  • In the "Deploy code" step of our deply-app.yml github workflow, the live site is rsynced incrementally over into the tool account.
  • .env file is no longer copied into the deployed code folder after copying is complete (the only version of .env lives in the miamatch-finder-repo directory)

Hints:

Notes:

  • come up with a good way to remove resources from production again if they are removed from the repository

Details

Other Assignee
hoo

Event Timeline

Lydia_Pintscher set the point value for this task to 5.

come up with a good way to remove resources from production again if they are removed from the repository

rsync --delete could do the trick for removing unneeded resources and --exclude should be able to save us the .env file with that approach

https://askubuntu.com/a/665918
https://unix.stackexchange.com/a/278577

hoo updated Other Assignee, added: hoo.

Sprint 2 - Review

  • tests aren't passing, but was actively being worked on up to the end of the sprint
  • veeery close to being done

sprint 3 review: done and twice verified