You've already forked wc-bootstrap
Add Docker development environment
Multistage Dockerfile (WooCommerce download, wp-bootstrap npm build, Composer deps, WordPress runtime), Compose stack with MariaDB, and auto-setup entrypoint that installs WordPress and activates the theme on first boot. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
30
README.md
30
README.md
@@ -76,6 +76,13 @@ wc-bootstrap/
|
||||
│ ├── notices/
|
||||
│ ├── order/
|
||||
│ └── single-product/
|
||||
├── docker/
|
||||
│ ├── Dockerfile # Multistage build (WC download, npm, composer, WP)
|
||||
│ ├── entrypoint.sh # Auto-setup wrapper entrypoint
|
||||
│ ├── setup.sh # First-run WP install + plugin/theme activation
|
||||
│ └── .env-dist # Environment variable template
|
||||
├── compose.yaml # WordPress + MariaDB services
|
||||
├── compose.override.yaml # Dev overrides (bind mounts, debug flags)
|
||||
├── composer.json
|
||||
├── functions.php
|
||||
└── style.css
|
||||
@@ -95,6 +102,29 @@ WooCommerce wc_get_template("cart/cart.php")
|
||||
→ Result: Bootstrap 5 Twig output only
|
||||
```
|
||||
|
||||
### Docker Environment
|
||||
|
||||
```bash
|
||||
# Copy and adjust environment variables (optional)
|
||||
cp docker/.env-dist .env
|
||||
|
||||
# Build and start
|
||||
docker compose build
|
||||
docker compose up -d
|
||||
|
||||
# WordPress installs automatically on first boot (admin/admin)
|
||||
# → http://localhost:8080
|
||||
# → http://localhost:8080/wp-admin/
|
||||
|
||||
# Manual setup (if WP_AUTO_SETUP=0)
|
||||
docker compose exec wordpress setup.sh
|
||||
|
||||
# Tear down
|
||||
docker compose down -v
|
||||
```
|
||||
|
||||
The image preinstalls WooCommerce and wp-bootstrap. The override bind-mounts both themes for live development.
|
||||
|
||||
### Building Translations
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user