Background
Break News
How to add local font to Tailwind Css and NextJS? - Tutorial Design Pattern? - Blockchain Technology, How to create own Bitcoin virtual currency - Zustand mordern management state - Design Pattern - Flyweight Pattern? - Docker Full training Topic

Get Started with DDEV - Docker for CakePHP, NodeJS, Python

Thursday 25 July 2024
|
Read: Completed in minutes

Get Started with DDEV - Docker for CakePHP, NodeJS, Python

✋Welcome back to Webzone tech tips, I am Zidane! Topic today is share with you how to use DDEV, and what is DDEV? it very useful for developer just focus on coding, development, and the environment just let DDEV and do it

Get Started with DDEV - Docker for CakePHP, NodeJS, Python


DDEV is an open-source tool that simplifies local web development environments using Docker. Here’s what you need to know:
1. Purpose: DDEV creates isolated development environments for PHP, Node.js, and Python (experimental). It allows you to work on multiple projects with different tech stacks and cloud servers.

2. Features:
    * Fast Setup: Spin up environments in minutes.
    * Multi-Platform: Works on macOS, Windows, and Linux.
    * Custom Domains & SSL: Handles custom domain names and HTTPS automatically.
    * App Ready Presets: Supports popular frameworks like Laravel, WordPress, Drupal, and more.
    * Unlimited Projects: Run multiple projects concurrently.
    * Extensible: Add-ons, lifecycle hooks, and custom Dockerfiles.
    * Open Source: Licensed under Apache 2.0.
 
3. Usage:
    * Install DDEV (follow the official documentation).
    * Create a DDEV project for your web application.
    * Use ddev start to launch the environment.
    * Access your project via the provided URLs (e.g., my-project.ddev.site).

# Install DDEV (MACOS)
brew install ddev/ddev/ddev

#Install DDEV (Window, Linux) -> you can check here

# One-time initialization of mkcert
mkcert -install

Staring a project
1. Clone or create the code for your project.
php8 composer create-project cakephp/app cf24

Since i have install PHP 7.4.33, 8.2.0 on the same machine, so i customize my PATH on my base profile like this.


export CLICOLOR=1
export LSCOLORS=gxfxCxDxBxegedabagaced


alias php8=/Applications/MAMP/bin/php/php8.2.0/bin/php
alias composer8=/Users/vihuuly/composerphp8/composer.phar
export PATH=/Applications/MAMP/bin/php/php7.4.33/bin:$PATH
export PATH=/Users/vihuuly/flutter/bin:$PATH
alias pip=/Library/Frameworks/Python.framework/Versions/3.12/bin/python3 -m pip
alias psql=/Library/PostgreSQL/16/bin/psql

if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
 

2. cd into the project directory and run ddev config to initialize a DDEV project.
ddev config

name: cf24
type: cakephp
docroot: webroot
php_version: "8.3"
webserver_type: nginx-fpm
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
database:
type: mysql
version: "8.0"
use_dns_when_possible: true
composer_version: "2"
web_environment: []
corepack_enable: false
disable_upload_dirs_warning: true

Sepecial DDEV support CakePHP 

Some basic comment

ddev start: run a docker (please note, open docker first, you can check docker topic here)

ddev restart

ddev mysql -> access mysql

ddev get --list -> show all list software available, this is useful comment

ddev get ddev/ddev-phpmyadmin, for install this plugin, (please note, use ddev restart/ ddev start to active plugin setup)

ddev auth token from Github for extense the download git (because for we use ddev get ddev-phpmyadmin: it download from github, so we need to auth to extention the time)

Click on github Profile avatar -> Settings -> Developer Settings -> Personal access tokens with Fine-grainde personal access tokens --> generate one (use for personal API use and for using Git over HTTPS)

3. Run ddev start to spin up the project.
4. Run ddev launch to open your project in a browser. 

Thanks for reading. Any feedback and questions for topic: Get Started with DDEV - Docker for CakePHP, NodeJS, Python. Leave your comment on below post, we can discuss about it.
✋✋ Learn Tech Tips - I am Zidane, See you next time ✋✋


πŸ™‡πŸΌπŸ™‡πŸΌ We Appreciate Your Comments and Suggestions - Webzone, all things Tech Tips web development
Popular Webzone Tech Tips topic maybe you will be like it - by Webzone Tech Tips - Zidane
As a student, I found Blogspot very useful when I joined in 2014. I have been a developer for years . To give back and share what I learned, I started Webzone, a blog with tech tips. You can also search for tech tips zidane on Google and find my helpful posts. Love you all,

I am glad you visited my blog. I hope you find it useful for learning tech tips and webzone tricks. If you have any technical issues, feel free to browse my posts and see if they can help you solve them. You can also leave a comment or contact me if you need more assistance. Here is my blog address: https://learn-tech-tips.blogspot.com.

My blog where I share my passion for web development, webzone design, and tech tips. You will find tutorials on how to build websites from scratch, using hot trends frameworks like nestjs, nextjs, cakephp, devops, docker, and more. You will also learn how to fix common bugs on development, like a mini stackoverflow. Plus, you will discover how to easily learn programming languages such as PHP (CAKEPHP, LARAVEL), C#, C++, Web(HTML, CSS, javascript), and other useful things like Office (Excel, Photoshop). I hope you enjoy my blog and find it helpful for your projects. :)

Thanks and Best Regards!
Follow me on Tiktok @learntechtips and send me a direct message. I will be happy to chat with you.
Webzone - Zidane (huuvi168@gmail.com)
I'm developer, I like code, I like to learn new technology and want to be friend with people for learn each other
I'm a developer who loves coding, learning new technologies, and making friends with people who share the same passion. I have been a full stack developer since 2015, with more than years of experience in web development.
Copyright @2022(November) Version 1.0.0 - By Webzone, all things Tech Tips for Web Development Zidane
https://learn-tech-tips.blogspot.com