Posts

Showing posts with the label docker compose

Lowering the boundary to Code Contribution

Image
Thinking of using Gitpod as your Cloud IDE? Read this first... I'm preparing for a hands-on coding workshop and wanted my participants to get coding as fast as they can. I decided to leverage Gitpod as a Cloud IDE. Here’s how I set it up including challenges I encountered and their remedies. 🧑‍💻 Gitpod Gitpod is a tool I've been using to set up an isolated development (dev) environment for troubleshooting. I have relied on ready made repositories from the open source community, but now was a chance to dive deeper. 🐳 Docker Compose Ready My repository uses docker and docker compose. Docker is great for providing consistent dev environments across multiple developers. It's also great for isolating your project from other projects on your machine so you can mix and match your tools. I dived straight in and got my repository loaded on Gitpod. Gitpods default image  supports docker, docker compose, php, and node out of the box. So it was as simple as running ‘docker compose u...

Debug faster: a ddev and docker4drupal comparison

Image
I've started experimenting with DDEV for local development environments. It provides simple commands to quickly get you up and running compared to docker4drupal . However docker4drupal has the upper-hand when you want to restore databases into your dev environment. Its easier and faster compared to drush sqlc or DDEV commands. To enable this feature on docker4drupal, uncomment these lines in the mariadb container. Next create a folder called mariadb-init and drop your db in there then start up your container. It will pickup any files with *.sql or *.sql.gz If your container is already running you'll need to restart it. I find that its easier to destroy it and start again. docker compose stop mariadb && docker compose rm -f mariadb && docker compose up -d Tip: Ive made this easier by adding an alias called dbdb to run the above. Now if I need to debug an issue using a snapshot of production data, I can load it into the mariadb-init folder and run dbdb to start...