You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -5,7 +5,7 @@ This project is a tailored fork of the popular [drupal-composer template](https:
5
5
## Getting started
6
6
7
7
1.**Create a new project repository**
8
-
Click "[Use this template](https://github.com/wunderio/drupal-project/generate)" to generate a new project:
8
+
Click "[Use this template](https://github.com/wunderio/drupal-project/generate)" to generate a new project:
9
9
- Select the correct owner.
10
10
- Name the project as `client-COUNTRYCODE-CLIENT-PROJECT`.
11
11
- Set the repository to private (unless the project is public).
@@ -77,20 +77,22 @@ This project supports two local development environments: DDEV (preferred) and L
77
77
2. Ensure Docker is running on your system
78
78
3. Start the environment and set up your project:
79
79
80
-
```bash
81
-
# Start the DDEV environment
82
-
ddev start
80
+
```bash
81
+
# Start the DDEV environment
82
+
ddev start
83
83
84
-
# Authenticate SSH for database syncing
85
-
ddev auth ssh
84
+
# Authenticate SSH for database syncing
85
+
ddev auth ssh
86
86
87
-
# Synchronize local database with a remote environment
88
-
# See `scripts/syncdb.sh` for options
89
-
ddev syncdb
87
+
# Synchronize local database with a remote environment
88
+
# See `scripts/syncdb.sh` for options
89
+
ddev syncdb
90
90
91
-
# Get a one-time login link for admin access
92
-
ddev drush uli
93
-
```
91
+
# Get a one-time login link for admin access
92
+
drush uli
93
+
```
94
+
95
+
Note: All commands in the DDEV section should be run within the DDEV environment using `ddev` prefix (e.g., `ddev drush uli`), or by using `ddev ssh` to access the container shell first.
94
96
95
97
#### DDEV services and access points
96
98
@@ -141,9 +143,9 @@ For a complete list of all available services, URLs, and ports, use:
1. **Varnish Configuration**: DDEV comes pre-configured with Varnish in`.ddev` folder.
264
+
265
+
2. **Testing Configuration**:
266
+
267
+
```bash
268
+
ddev drush cr
269
+
ddev exec curl -X BAN -H "Cache-Tags: config:system.performance" http://varnish
270
+
```
271
+
272
+
If working correctly, you should receive a "200 Ban added" response
273
+
274
+
3. **Viewing Varnish logs**:
275
+
276
+
```bash
277
+
ddev exec -s varnish varnishlog -i BAN -i Cache
278
+
```
279
+
280
+
##### Lando
281
+
282
+
1. **Enable Varnish**:
283
+
- Varnish configuration is already enabled in`.lando.yml`&`.lando/varnish.vcl`.
284
+
285
+
2. **Testing Configuration**:
286
+
287
+
```bash
288
+
lando drush cr
289
+
lando ssh -c "curl -X BAN -H 'Cache-Tags: config:system.performance' http://varnish"
290
+
```
222
291
223
-
- Find the purger ID in the exported `varnish_purger.settings.<PURGER_ID>.yml` file.
224
-
- Update `web/sites/default/settings.php`:
225
-
- Replace all occurrences of `varnish_purger.settings.<OLD_ID>` with the new purger ID.
226
-
- Clear the cache:
292
+
### Important Notes
227
293
228
-
```bash
229
-
lando drush cr
230
-
```
294
+
- **BAN vs PURGE Method:** Always use the "BAN" method in the Varnish purger configuration instead of "PURGE". The Silta Varnish configuration is set up to handle BAN requests but may reject PURGE requests with "405 Method Not Allowed" errors.
231
295
232
-
Varnish should now be configured to handle caching and purging when content is updated.
296
+
- **Processors:** The default Purge setup uses the `purge_processor_lateruntime` module, which empties the purge queue during page requests. This works well for most sites needing immediate cache clearing. Ensure all required processors are enabled.
233
297
234
-
**Note:** The default Purge setup uses the `purge_processor_lateruntime` module, which empties the purge queue during page requests. This works well for most sites needing immediate cache clearing.
298
+
- **Cache Tags:** The Varnish configuration is set up to handle cache tag invalidation with the `Cache-Tags` header.
235
299
</details>
236
300
237
301
<details>
@@ -243,11 +307,11 @@ The [PHPUnit](https://phpunit.de/) test framework is predefined in this project.
243
307
244
308
#### Testing examples
245
309
246
-
Use `lando phpunit`to run PHPUnit commands:
310
+
Note: Run these commands with the appropriate environment prefix (`ddev phpunit`or `lando phpunit`).
247
311
248
-
- Run one test class: `lando phpunit path/to/your/class/file.php`
249
-
- List groups: `lando phpunit --list-groups`
250
-
- Run all tests in a particular group: `lando phpunit --group Groupname`
312
+
- Run one test class: `phpunit path/to/your/class/file.php`
313
+
- List groups: `phpunit --list-groups`
314
+
- Run all tests in a particular group: `phpunit --group Groupname`
0 commit comments