Move `migrate` to `abra.sh` command

This commit is contained in:
3wc 2022-03-30 18:08:27 +02:00
parent a748dce34b
commit 37fb7cd5d0
2 changed files with 9 additions and 4 deletions

View File

@ -34,12 +34,11 @@ Wiki and knowledge base for growing teams
### Post-deploy migration
```
abra app run YOURAPPNAME app sh
export DATABASE_PASSWORD=$(cat /run/secrets/db_password)
export DATABASE_URL="postgres://outline:${DATABASE_PASSWORD}@${STACK_NAME}_postgres:5432/outline"
yarn db:migrate --env=production-ssl-disabled
abra app cmd YOURAPPNAME app migrate
```
_As of 2022-03-30, this requires `abra` RC version, run `abra upgrade --rc`._
### Setting up your `.env` config
Avoid the use of quotes (`"..."`) as much as possible, the NodeJS scripts flip out for some reason on some vars.

View File

@ -1,5 +1,11 @@
export APP_ENTRYPOINT_VERSION=v4
migrate() {
export DATABASE_PASSWORD=$(cat /run/secrets/db_password)
export DATABASE_URL="postgres://outline:${DATABASE_PASSWORD}@${STACK_NAME}_postgres:5432/outline"
yarn db:migrate --env=production-ssl-disabled
}
delete_user() {
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: ... delete_user <user-to-delete> <user-to-replace>"