mybuddy/bin/ci-pre-deploy

8 lines
291 B
Bash

#!/bin/sh -l
if [ "$IS_REVIEW_APP" = "true" ]; then
DOMAIN="$APP_NAME.dokku.baby-buddy.net"
ssh "$SSH_REMOTE" -- config:set "$APP_NAME" "ALLOWED_HOSTS=$DOMAIN CSRF_TRUSTED_ORIGINS=http://$DOMAIN"
ssh "$SSH_REMOTE" -- domains:add "$APP_NAME" "$DOMAIN"
echo "Review app configured"
fi