github.com/ddev/ddev@v1.23.2-0.20240519125000-d824ffe36ff3/pkg/ddevapp/dotddev_assets/providers/git.yaml.example (about) 1 #ddev-generated 2 # Example git provider configuration. 3 4 # To use this configuration, 5 6 # 1. Create a git repository that contains a database dump (db.sql.gz) and a files tarball. It can be private or public, but for most people they will be private. 7 # 2. Configure access to the repository so that it can be accessed from where you need it. For example, on gitpod, you'll need to enable access to GitHub or Gitlab. On a regular local dev environment, you'll need to be able to access github via https or ssh. 8 # 3. Update the environment_variables below to point to the git repository that contains your database dump and files. 9 10 environment_variables: 11 project_url: https://github.com/ddev/ddev-pull-git-test-repo 12 branch: main 13 checkout_dir: ~/tmp/ddev-pull-git-test-repo 14 15 16 auth_command: 17 service: host 18 # This actually doesn't auth, but rather just checks out the repository 19 command: | 20 set -eu -o pipefail 21 if [ ! -d ${checkout_dir}/.git ] ; then 22 git clone -q ${project_url} --branch=${branch} ${checkout_dir} 23 else 24 cd ${checkout_dir} 25 git reset --hard -q && git fetch && git checkout -q origin/${branch} 26 fi 27 28 db_import_command: 29 service: host 30 command: | 31 set -eu -o pipefail 32 # set -x 33 ddev import-db --file="${checkout_dir}/db.sql.gz" 34 35 files_import_command: 36 service: host 37 command: | 38 set -eu -o pipefail 39 # set -x 40 ddev import-files --source="${checkout_dir}/files"