Kaffedrengen.dk — Project Documentation¶
WordPress/WooCommerce coffee subscription site built on Roots Bedrock.
Docker is used for local development only and is not part of the production setup.
Stack¶
- WordPress (Bedrock) — PHP, Composer-managed plugins
- WooCommerce + WooCommerce Subscriptions
- Frontend — Vue 2, Tailwind CSS, Bulma, Webpack (Laravel Mix)
- Docker — PHP-FPM, nginx, MariaDB, Redis
Repository structure¶
.
├── devops/ # Docker configs per environment (local, dev, prod)
│ └── local.example/ # Copy this to devops/local/ for local overrides
├── docs/ # Project documentation
├── site/ # Roots Bedrock WordPress installation
│ ├── config/ # WordPress and environment configuration
│ │ └── environments/# Per-environment PHP config (development, staging, production)
│ ├── customizations/ # Custom MU-plugin
│ ├── src/ # Frontend source (JS, SCSS, images)
│ ├── web/ # Document root served by nginx
│ │ ├── app/ # wp-content equivalent (plugins, themes, uploads)
│ │ └── wp/ # WordPress core (managed by Composer)
│ ├── composer.json
│ └── package.json
├── system/ # Runtime volumes (logs, releases, uploads) — git-ignored
├── docker-compose.yml
└── .env.example # Docker environment template
Local setup¶
Prerequisites¶
- Docker and Docker Compose
- SSH key with access to the Bitbucket repository
- SSH key with access to
packagist.barberklingen.dk(private Composer registry)
Verify your Docker installation:
1. Clone the repository¶
git clone git@bitbucket.org:barberklingen-wordpress/kaffedrengen-dk-bedrock.git
cd kaffedrengen-dk-bedrock
2. Configure the Docker environment¶
Edit .env and set values appropriate for your machine (container names, ports, etc.).
3. Copy the devops local config¶
Adjust the nginx, PHP, and MySQL configs inside devops/local/ if needed.
4. Configure the WordPress environment¶
Edit site/.env and fill in at minimum:
| Variable | Description |
|---|---|
DB_NAME | Database name |
DB_USER / DB_PASSWORD | Database credentials |
DB_HOST | MariaDB container name (matches the container name set in .env) |
WP_HOME | Site URL (e.g. http://localhost:8080) |
WP_SITEURL | ${WP_HOME}/wp |
AUTH_KEY … NONCE_SALT | Generate at roots.io/salts |
5. Start the containers¶
6. Install PHP dependencies¶
Run Composer inside the PHP container:
docker exec -it <php-container-name> bash -c "cd /var/www/<project>/releases/current && composer install"
Or locally if you have PHP and Composer installed and SSH access to the private registry:
7. Access the site¶
Open the URL you set for WP_HOME in your browser. The WordPress admin is at WP_HOME/wp/wp-admin.
Frontend development¶
All frontend source lives in site/src/. Assets are compiled with Webpack via Laravel Mix.