---
# System prepended metadata

title: Untitled

---

x Tag old code (master)
x Bump version in yarn on develop
x Merge develop into main
x Create release tag for main

Merge to master in repos:
- opennode-bitcoin
- opennode-email
- opennode-analytics

Pull release (or main?) on both production nodes

Install dependencies (yarn install)
Configure `.env.production`

Update status page

Stop app

Run migrations:

1. `DROP MATERIALIZED VIEW checkouts_expanded;`
2. `SET session_replication_role = 'replica';` (disables fk checks for speed)
3. `yarn migrate:up`


While migration is running:

Deploy new releases of the following repos:
- opennode-bitcoin
- opennode-email
- opennode-analytics

Merge to master (will auto deploy):
- opennode-dashboard
- opennode-checkout


After migration runs:
`SET session_replication_role = 'origin';` (re-enable fk checks)

Start app
- With cron `CRON_JOB=true NODE_ENV=production TS_NODE_PROJECT=tsconfig.dist.json yarn pm2-start:prod --only=opennode-api-server`
- Without cron `NODE_ENV=production TS_NODE_PROJECT=tsconfig.dist.json yarn pm2-start:prod --only=opennode-api-server`

Update status page
