Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielrindlaub committed Sep 19, 2023
1 parent 0c72814 commit 4d76ca9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,18 @@ It will request backend resources that are also in their respective staging envi
### `npm run deploy-dev` & `npm run deploy-prod`

Builds the app for deployment and deploys it to dev/production environment.<br />

## Prod deployment
Use caution when deploying to production, as the application involves multiple stacks (animl-ingest, animl-api, animl-frontend), and often the deployments need to be synchronized. For major deployments to prod in which there are breaking changes that affect the other components of the stack, follow these steps:

1. Set the frontend `IN_MAINTENANCE_MODE` to `true` (in `animl-frontend/src/config.js`), deploy to prod, then invalidate its cloudfront cache. This will temporarily prevent users from interacting with the frontend (editing labels, bulk uploading images, etc.) while the rest of the updates are being deployed.

2. Set ingest-image's `IN_MAINTENANCE_MODE` to `true` (in `animl-ingest/ingest-image/task.js`) and deploy to prod. This will temporarily route any images from wireless cameras that happen to get send to the ingestion bucket to the `animl-images-parkinglot-prod` bucket so that Animl isn't trying to process new images while the updates are being deployed.

3. Backup prod DB by running `npm run export-db-prod` from the `animl-api` project root.

4. Deploy animl-api to prod.

5. Turn off `IN_MAINTENANCE_MODE` in animl-frontend and animl-ingest, and deploy both to prod

6. Copy any image that happened to land in `animl-images-parkinglot-prod` while the stacks were being deployed to `animl-images-ingestion-prod`
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "animl-frontend",
"version": "1.0.0",
"version": "2.0.0",
"private": true,
"dependencies": {
"@aws-amplify/ui-react": "^5.0.3",
Expand Down

0 comments on commit 4d76ca9

Please sign in to comment.