173
Views

It’s been awhile since I’ve setup a development environment for anything outside of WordPress. I dabble in React which includes it’s own development server. I use Local for WordPress because it’s so easy! So when I started setting up my new Mac and started looking at some of the options out there, plenty has changed.

A couple of years ago I got into Docker which I used with Devilbox on the recommendation. That worked find but on my Intel based 2018 MacBook Pro with a 265gb hard drive and 16gb of ram it seemed to tax the computer a bit, before installation I rarely remembered that the computer had fans. While using Docker and Devilbox they rarely turned off.

With so much innovation since then I decided to research some of the new environments available. Something Docker seemed to be the standard but a few options stood out. I finally settled on Lando or DDEV. With this decision I found that I had more options than just Docker Desktop for my containers.

DDEV and Colima

With some research under my belt I decided to move forward with DDEV and Colima. I’m sure plenty of people with have their opinions about this and I’m happy to hear them in the comments section.

For me I liked that Colima seemed to offer better performance while remaining open source. In much of what I read it also seemed to be very simple and worked pretty flawlessly with DDEV.

I chose DDEV over Lando because it sound like configurations were easier, a more one click solution if you will. I don’t need much really based on the projects I have planned.

Colima Installation

This is mostly for my own personal notes and advise using the install guide found here: https://ddev.readthedocs.io/en/stable/users/install/docker-installation/#colima.

However I find it nice to have some references available here for quick access.

Install Colima with Homebrew

Run

brew install docker

Next run

brew install colima

I started Colima with the suggested settings.

colima start --cpu 4 --memory 6 --disk 100 --vm-type=qemu --mount-type=sshfs --dns=1.1.1.1

If you happen to be running a macOS version previous to Ventura omit:

--vm-type=qemu

Starting Colima

You can either have Colima start after reboot or when you need it.

Auto boot with Homebrew on reboot run:

brew services start colima

I will be starting it manually with:

colima start

To edit Colima’s configuration use:

colima start -e

To check Colima’s status use:

colima status

DDEV Installation

Again I recommend using the official documentation for here for your installation:  https://ddev.com/get-started/

To install DDEV use Homebrew:

brew install ddev/ddev/ddev

Starting DDEV

Navigate to the location of the new project:

cd ~/my-project

Initialize the project with:

ddev config

Start the project with:

ddev start

To open the project in the browser use:

ddev launch

To view your server settings including connection info for the DB and PHP version:

ddev describe

Conclusion

So far I am really happy with the setup. There are additional tools for exporting environments and saving them in Git. You can easily import databases and much more. Let me know if you use this setup or your favorite alternative.

Article Tags:
· · · · ·
Article Categories:
Coding
SDATIC

Web developer and former photographer by trade...gamer and all around tech enthusiast in his free time. Christoph started sdatic.com as a way to organize his ideas, research, notes and interests. He also found it enjoyable to connect and share with others who parallel his interests. Everything you see here is a resource that he found useful or interesting and he hopes that you will too.

Leave a Reply

Your email address will not be published. Required fields are marked *