Add a Service to Your Project

Add Redis, OpenSearch, Node, or another service to an existing Waddle project, rebuild it, and connect your application to the new service.

A project rarely stays the way it started. Sooner or later you want a cache, a search engine, or a build tool next to your site. For the services Waddle provides, that means switching one on in the project settings and building again. For anything else, you add it to the project’s Docker Compose configuration yourself. This walkthrough adds Redis to the WordPress project from Create Your First Project, and every built-in service works the same way.

Open the project settings

In the project list, click the paintbrush icon () on your project’s row. This opens the project settings, with a sidebar on the left:

  • Save and Delete at the top.
  • One tab per part of the project below them. General holds project-wide settings, the next tab is named after your blueprint (WordPress here), and then come PHP, Nginx, MariaDB, Node, Redis, OpenSearch, Mail, and Remotes.
Waddle's project settings on the General tab, with the left-hand sidebar highlighted.
The sidebar with Save, Delete, and one tab per part of the project.

Turn the service on

Click the Redis tab and switch on Install Redis.

The Version field below it is empty by default, which means the latest available release. To pin another, type a version, a shorthand such as 7.x (Waddle turns it into a regex in the background), or any regex, and press Enter.

Click Save. Waddle stores the change in the project’s configuration and, unless you have turned the setting off, commits it to the project’s Git repository for you.

The Redis tab with Install Redis switched on and an empty Version field resolving to 8.10.3.
Install Redis switched on. The empty Version field resolves to the latest release.

Saving doesn’t touch the running project yet. Nothing changes until you build.

Build again

Go back to the project list and choose Build from the project’s build dropdown, exactly as you did the first time.

This time the build overview only lists what changed, so you should see Redis being added. Click Build. Waddle compiles Redis from source the first time, then restarts the project with Redis running alongside everything else.

The build overview listing Redis, installing version 8.10.3.
The build overview only lists what changed, here Redis being installed.

Please note that a build needs a clean Git repository. If you have edited files in the project yourself, commit them before you build. When Waddle finds uncommitted changes, it stops and offers to discard them, so commit first if you want to keep them.

Connect your application

Every service in a project can reach the others by their service name. Your application connects to Redis at host redis on port 6379. You never need an IP address, and the same settings work on a deployed server too.

A PHP application also needs PHP’s redis extension to talk to Redis. Open the PHP tab, type redis in the Extensions table’s input, add it, then save and build once more.

The PHP tab's Extensions section with the Extension field highlighted and redis in the list.
The Extension field in the PHP tab, with redis added to the list.

For WordPress, the usual next step is a Redis object cache plugin, pointed at host redis. Other applications have their own cache settings, which take the same host and port.

Other services

The other service tabs follow the same pattern of switching the service on, saving, and building.

Tab Switch What you get Host and port
OpenSearch Install OpenSearch A search engine, used by Magento and others opensearch, 9200
Node Install Node Node.js and npm, for building front-end assets or running a Node app Not needed
MariaDB Install MariaDB A database server, already on for most blueprints db, 3306
Mail Enable mail A local inbox that catches every email your site sends See Test Emails Locally

phpMyAdmin & Composer can be installed and configured from the PHP tab.

A service Waddle doesn’t provide

If you need something that has no tab, such as a message queue or a different database, add it to the project’s Docker Compose configuration by hand. Edit templates/docker-compose.yml inside the project folder, not the docker-compose.yml next to it. Waddle renders the second from the first, so your service stays in step with any settings you change later. Add your service under services:, commit the change, and build.

Give your service the same networks: entry as the existing services in that file, or the rest of the project can’t reach it. Once it shares their network, the others reach it by its service name, just like redis. See The Three Docker Compose Files for how the Compose files fit together.

Changing or removing a service

Changing a version works the same way. Pick the new version in the service’s tab, save, and build. To remove a service, switch it off, save, and build. The build overview always shows you what is about to change before anything happens.

Next: Test Your Site’s Emails Locally