Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Jan 17, 2025
1 parent e7188d7 commit f5023f4
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function sidebar() {
items: [
{text: 'Overview', link: '/'},
{text: 'Installation', link: '/install'},
{text: 'Usage', link: '/config'},
{text: 'Configuration', link: '/config'},
],
},
{
Expand Down
25 changes: 12 additions & 13 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ description: Learn how to configure the Lando Varnish service.

# Configuration

Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/core/v3/services/lando.html) to get a good handle on how the magicks work.
Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/services/lando-3.html) to get a good handle on how the magicks work.

Also note that options, in addition to the [build steps](https://docs.lando.dev/core/v3/services/lando.html#build-steps) and [overrides](https://docs.lando.dev/core/v3/services/lando.html#overrides) that are available to every service, are shown below:
Also note that options, in addition to the [build steps](https://docs.lando.dev/services/lando-3.html#build-steps) and [overrides](https://docs.lando.dev/services/lando-3.html#overrides) that are available to every service, are shown below:

```yaml
services:
myservice:
type: varnish:4.1
backends:
- appserver
type: varnish:6.0
backend: appserver
backend_port: 80
ssl: false
config:
Expand All @@ -25,28 +24,28 @@ services:
## Connecting to backend services
You will need to list the `http` backend services you want `varnish` to use. Note that the services in this list should be serving content on port `80`. They can be discovered by running [lando info](https://docs.lando.dev/cli/info.html).
You will need to specify the `http` backend services you want `varnish` to use.

An example of a Landofile's `services` config that connects to a `nginx` backend called `web1` is shown below:

```yaml
services:
myservice:
type: varnish
backends:
- web1
type: varnish:6.0
backend: web1
web1:
type: nginx
```

## Setting a port

While we assume your `varnish` service is running on port `80`, we recognize that many apps also run on other ports. You can easily change our default to match whatever your app needs. Note that this port applies to **ALL BACKENDS**.
While we assume your `varnish` service is running on port `80`, we recognize that many apps also run on other ports. You can easily change our default to match whatever your app needs.

```yaml
services:
myservice:
type: varnish
type: varnish:6.0
backend: web2
backend_port: 8080
```

Expand Down Expand Up @@ -74,7 +73,7 @@ Note that you can put your configuration files anywhere inside your application
```yaml
services:
myservice:
type: varnish
type: varnish:6.0
config:
vcl: config/custom.vcl
```
Expand All @@ -83,7 +82,7 @@ services:

There are also [several envvars](https://github.com/wodby/varnish) exposed by the underlying image we use that you can set to further customize how your Varnish works. **These are not officially supported** so we *highly recommend* you do not alter them unless you know what you are doing. Even then, YMMV.

That said, you will need to use a [service override](https://docs.lando.dev/core/v3/services/lando.html#overrides) to take advantage of them as shown below:
That said, you will need to use a [service override](https://docs.lando.dev/services/lando-3.html#overrides) to take advantage of them as shown below:

```yaml
myservice:
Expand Down
21 changes: 14 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Varnish Lando Plugin
description: Add a highly configurable varnish service to Lando for local development with all the power of Docker and Docker Compose.
next: ./config.html
---

# Varnish
Expand All @@ -13,21 +12,29 @@ You can easily add it to your Lando app by adding an entry to the [services](htt
```yaml
services:
myservice:
type: varnish
backends:
- appserver
type: varnish:6.0
backend: appserver
backend_port: 80
```
## Supported versions
* [6.0](https://hub.docker.com/r/wodby/varnish)
* [6](https://hub.docker.com/r/wodby/varnish)
* **[4.1](https://hub.docker.com/r/wodby/varnish)** **(default)**
* [custom](https://docs.lando.dev/services/lando-3.html#overrides)
## Legacy versions
::: warning Using Unsupported Varnish Versions!
While you can currently use some [EOL Varnish versions](https://endoflife.date/varnish) with Lando, it's worth noting that we also do not support such versions, so your mileage may vary. If you are having issues with unsupported versions and open a ticket about it, the most likely response you will get is "upgrade to a supported version".
:::
You can still run these versions with Lando but for all intents and purposes they should be considered deprecated (e.g. YMMV and do not expect a ton of support if you have an issue).
* [4.1](https://hub.docker.com/r/wodby/varnish)
* [4](https://hub.docker.com/r/wodby/varnish)
* [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides)
## Patch versions
This service does not support patch versions but if you **really** need something like that, you could consider using either a [custom compose service](https://docs.lando.dev/plugins/compose) or a service [overrides](https://docs.lando.dev/core/v3/services/lando.html#overrides).
This service does not support patch versions but if you **really** need something like that, you could consider using either a [custom compose service](https://docs.lando.dev/plugins/compose) or a service [overrides](https://docs.lando.dev/services/lando-3.html#overrides).
2 changes: 1 addition & 1 deletion examples/4.x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This example exists primarily to test the following documentation:

* [Varnish Service](https://docs.devwithlando.io/tutorials/varnish.html)
* [Varnish Service](https://docs.lando.dev/plugins/varnish)

## Start up tests

Expand Down
2 changes: 1 addition & 1 deletion examples/6.x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This example exists primarily to test the following documentation:

* [Varnish Service](https://docs.devwithlando.io/tutorials/varnish.html)
* [Varnish Service](https://docs.lando.dev/plugins/varnish)

## Start up tests

Expand Down
2 changes: 1 addition & 1 deletion examples/custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This example exists primarily to test the following documentation:

* [Varnish Service](https://docs.devwithlando.io/tutorials/varnish.html)
* [Varnish Service](https://docs.lando.dev/plugins/varnish)

## Start up tests

Expand Down
2 changes: 1 addition & 1 deletion examples/defaults/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This example exists primarily to test the following documentation:

* [Varnish Service](https://docs.devwithlando.io/tutorials/varnish.html)
* [Varnish Service](https://docs.lando.dev/plugins/varnish)

## Start up tests

Expand Down

0 comments on commit f5023f4

Please sign in to comment.