DDEV & Related Things

Info

Quick references DDEV to launch web development environments. View the official docs for more information.

Why I used

Some commands I usually use

Multi-column
Terminal window
# intialize ddev
ddev config
# delete project
ddev ddev --omit-snapshot <project_id>
# list all projects
ddev list
# start ddev into project
ddev start
# stop ddev into project
ddev stop
# restart into project
ddev restart
# logs container
ddev log <services>
# list out ddev services per-project
ddev describe
# download add-on
ddev get <add_on>
# db gui
ddev sequeplace # launch Seq

Configurations

web_extra_daemons:
- name: 'http-1'
- command: 'PORT=3000 npm run dev'
- directory: /var/www/html
omit_containers: [db]

NextJS Nginx Configurations

.ddev/nginx_full/nginx-site.conf
server {
listen 80;
listen 443 ssl;
ssl_certificate /etc/ssl/certs/master.crt;
ssl_certificate_key /etc/ssl/certs/master.key;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
include /etc/nginx/monitoring.conf;
error_log /dev/stdout info;
access_log /var/log/nginx/access.log;
include /etc/nginx/common.d/*.conf;
include /mnt/ddev_config/nginx/*.conf;
}

Performance Mode

Terminal window
ddev mutagen reset # reset data
ddev config --global --performance-mode=none # disable for all projects
ddev config --performance-mode=none # disable for per-project

PHPSTORM