Skip to content

Commit

Permalink
chore: Add Dev and Staging section to OPERATIONS.md, starting with ma…
Browse files Browse the repository at this point in the history
…nual migrations #4366
  • Loading branch information
svenaas committed Jan 18, 2024
1 parent 0c232fb commit d88fc12
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions OPERATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,27 @@ $ cf run-task pages-<env> --command "yarn migrate-site-repo 1 user@agency.gov ag
$ cf logs --recent pages-<env>
```

## Dev and Staging

### Manually running migrations in dev or staging environments

It may necessary at some point to `migrate:down` or `:up` to explore something in the dev or staging environment, or to resolve an earlier failure.

This can be done by first doing a `cf login` and selecting the appropriate org and space.

Then, shell into the environment, e.g. `cf ssh pages-dev`.

From there:

```bash
$ /tmp/lifecycle/shell

$ node --env-file=.env ./ci/tasks/configure-database-migrations.js

## Example migrate down
$ node node_modules/.bin/db-migrate down --config database.json -e production
```

## CI

### Nightly site bucket key rotations
Expand Down

0 comments on commit d88fc12

Please sign in to comment.