3. The api service has a similar configuration, but you’ll notice the routing rule has two conditions - the host must be “localhost” and the URL path must have a prefix of “/api”. Since this rule is more specific, Traefik will evaluate it first compared to the client rule.
```yaml {hl_lines=[7,8]}
services:
# …
api:
build: ./dev/api
volumes:
- "./api:/var/www/html/api"
labels:
traefik.http.routers.api.rule: "Host(`localhost`) && PathPrefix(`/api`)"
```
4. And finally, the `phpmyadmin` service is configured to receive requests for the hostname “db.localhost”. The service also has environment variables defined to automatically log in, making it a little easier to get into the app.
```yaml {hl_lines=[5,6]}
services:
# …
phpmyadmin:
image: phpmyadmin:5.2.1
labels:
traefik.http.routers.db.rule: "Host(`db.localhost`)"
environment:
PMA_USER: root
PMA_PASSWORD: password
```
5. Before starting the stack, stop the Nginx container if it is still running.
And that’s it. Now, you only need to spin up the Compose stack with a `docker compose up` and all of the services and applications will be ready for development.
## Sending traffic to non-containerized workloads
In some situations, you may want to forward requests to applications not running in containers. In the following architecture diagram, the same application from before is used, but the API and React apps are now running natively on the host machine.