- Docker
- Linux OS (or WSL on Windows)
cms
: CMS service, i.e. Drupal service (debian + apache)db
: Database service, i.e. mySQLdbadmin
: Database GUI admin, i.e. phpMyAdmin (indevelopment
environment only)email
: Dummy email server, i.e. mailhog (indevelopment
environment only)
bash run.sh --build
bash run.sh --start
bash run.sh --enter
bash drupal.sh --install
$ bash run.sh --build
You can build images separately by providing service name, e.g. to build cms
only, run:
$ bash run.sh --build cms
$ bash run.sh --start
You can start containers separately by providing service name, e.g. to start cms
only, run:
$ bash run.sh --start cms
$ bash run.sh --stop
You can stop containers separately by providing service name, e.g. to stop cms
only, run:
$ bash run.sh --stop cms
$ bash run.sh --log
$ bash run.sh --enter
By default cms
conatiner is entered. Yo can enter different conatainer by providing service name, e.g.:
$ bash run.sh --enter db
$ bash run.sh --sync-core
This copies drupal core, contributed modules and contributed themes to host. This is useful for development.
$ bash run.sh --archive-dump
This creates full website dump (code, files, and database) in archive
directory.
Note: cms
service must be running.
$ bash run.sh --archive-restore path/to/archive
This restores website from given archive dump (code, files, and database).
Note: cms
service must be running.
VS Code launch.json
config:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug on Docker",
"type": "php",
"request": "launch",
"hostname": "0.0.0.0",
"port": 9003,
"pathMappings": {
"/opt/drupal/web": "${workspaceFolder}/services/cms/src"
},
"xdebugSettings": {
"show_hidden": 1
}
}
]
}