We can also use the DDEV command import-db to import the database export into our project. Pretty neat, right?įrom here we can easily import a database SQL file into our project. Will open up the TablePlus app, if it’s installed, and connect to the database for the DDEV project you’re currently working in. It is a paid app but I use it so much that it has more than paid for the license fee in time saved and usefulness. Out-of-the-box, DDEV supports TablePlus, a very nice database management app. To do that, we’ll use the composer subcommand in DDEV: ddev composer install Since I just cloned this repository, I need to download the Composer dependency packages. Let’s start up the DDEV containers for this project and then update our project to support DDEV. But this time we’re not start a new project, we’ll setting up an existing one. Inside the project directory, we run ddev config just like we would for a new project. The next step is to configure the project with DDEV. I also already have DDEV installed and working. I also have a database export waiting in the wings. I already have the project repository cloned locally and ready for a local development environment. My copy of the project already has a database, of which I have an export so I can import it. I chose this because it doesn’t have any DDEV configuration in it yet and it’s an existing project. The Starter Blog is an official repository from the Craft CMS team that is the result of the tutorial in the documentation. I’m going to rehome the Craft CMS Starter Blog project to use DDEV. Then anyone who comes behind me and uses this project, will only have to run git clone and then ddev start to get up and running. The end result will be a localhost development environment that can be stored in a config file and saved as part of the project codebase (and be version controlled). Let’s look at how we can take an existing Craft CMS project and rehome it in DDEV for local development. It’s more likely your immediate usage of DDEV will be converting existing projects from bespoke local environments – where every developer on your team is doing their own local setup – to a local development environment that is uniform across the team for the project, and dictated by the project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |