User Tools

Site Tools


ddev

DDEV

Install

brew tap drud/ddev && brew install ddev

DDEV: reverse-deployment and import DB

ddev-update-db() {
    REVERSE=$(which typo3reverse)
    DDEV=$(which ddev)
    CONFIG=$1
 
    if [ ! -d ".ddev" ]; then
	  	echo "This folder is not a ddev project"
    fi
 
    if [ -d ".ddev" ]; then
        if [ -z "$1" ]
          then
            CONFIG='live'
        fi
        $REVERSE "$CONFIG" && $DDEV stop --remove-data && $DDEV import-db --src ".data/db/dump/$CONFIG.sql"
    fi
}
ddev.txt · Last modified: 2019/10/23 14:29 by admin