General Installation Instructions
cd /Users/yourusername/Sites
git clone https://github.com/peterconsuegra/wp-pete-docker.git
cd wp-pete-docker
cp .env.example.development .env
docker-compose up --build
Wait until the Docker build command finishes
Develop inside the Docker Container
1. Install Visual Studio Code
2. Install Visual Studio Code Dev Containers
3. Enter the container you want to develop
Docker Compose workflow cheatsheet (macOS)
Task | Command | What it does / when to use it |
---|---|---|
Start or rebuild the stack | bash cd ~/Sites/wp-pete-docker # or your folder docker compose up --build |
Builds images (if needed) and runs all services in the foreground. Hit <kbd>⌃ C</kbd> to stop. |
Get a shell inside a container | bash docker compose exec <service> bash Examples: wordpress · apache · php · db |
Useful for quick edits, log inspection or running WP-CLI / artisan commands. |
Re-build after editing a Dockerfile | bash docker compose build --no-cache <service> |
Forces a clean image build for wordpress, apache, or php after you tweak their Dockerfile. |
Reset phpMyAdmin | bash docker compose down docker volume rm wp-pete-docker_pma_data |
Drops the pma_data volume so phpMyAdmin is recreated on the next up . |
Delete all volumes (nuke & pave) | bash docker compose down -v |
Stops containers and removes every named/anonymous volume – irreversible. |
Restart Apache inside its container | bash docker compose exec apache bash apache2ctl restart |
Applies v-host changes without recreating the whole stack. |
Where Apache keeps v-hosts | /etc/apache2/sites-available → staging configs /etc/apache2/sites-enabled → live symlinks |
Edit the file in sites-available, then run apache2ctl graceful . |
Enter MySQL as root | bash docker compose exec db mysql -u root -p (password is the MYSQL_ROOT_PASSWORD from .env ) |
Handy for one-off queries or importing .sql files. |
Trigger a graceful Apache reload from PHP (CI/CD hooks) | “`bash curl -sf -H “X-Reload-Secret: $APACHE_RELOAD_SECRET” \ http://apache/internal-reload |