For sites already migrated to Upsun.
- If you've done this for one site already, skip to step 6.
- Install Docker Desktop. Docker Desktop is a container manager. It governs transactions between containers and the operating system.
- https://docs.docker.com/desktop/setup/install/mac-install/
- Launch Docker Desktop from the Applications folder.
- Install DDev. Creates Docker containers and provides interfaces to them.
brew install ddev
- Install mkcert — a simple tool for making locally-trusted development certificates.
mkcert -install
- Install Upsun CLI.
- Create a directory for your local.
mkdir path/to/hosting/directory/site-namecd site-name
- Pull Upsun project files. This will install the stage environment into a directory named stage.
upsun project:listto get project list. This may prompt you to login to the Upsun console. If you get access errors, log in explicitly withupsun login.- Copy ID for site-name.
upsun get -e stage ID stagecd stage
- Add GT remote to the local repository. This allows pushes to both the GT enterprise Github and Upsun’s git repositories.
git remote add origin repo-URL
- Install Composer-managed files and regenerate class loader.
composer installcomposer dump-autoload
- Initialize the DDev environment:
ddev config- Project name:
local.site-name.gatech.edu - Docroot location:
web - Project type:
drupal11
- Project name:
- Pull database from Upsun.
ddev pull upsun --skip-files- Alternately, you can
ddev pull upsunif you want all the files in /sites/default/files but be warned, this can be very time-consuming and can eat up vast amounts of space on your hard drive.
- Start DDev.
ddev start- When the start process is complete, you can navigate to your local at https://site-name.gatech.edu.ddev.site.
DDev shutdown
ddev poweroffis the simplest way to shut down all running containers. You can also simply do ddev stop in the directory of a DDev project to shut down the one.- If your sites are hosted in an external harddrive, you will need to then quit Docker Desktop to eject the drive. Otherwise the mutagen agent (which synchronizes changes between the container and the native filesystem) will prevent the drive from being ejected. Note that if you do these steps in the reverse order (first quitting Docker Desktop and then powering off DDev), the mutagen agent may hang, requiring a force quit.