How to specify a Docker Network in ros service .yml

Hey all, I’m just getting started with RancherOS - for now, just trying to run firefly-iii and mariadb. I’ve got them both running successfully in regular user containers, now I’m trying to get them set up as system services because I want them to start on boot and that seems to be the recommended method. My issue is that the firefly-iii container must have an environment variable DB_HOST that contains the hostname or IP where the database can be reached - I can set this manually based on what I’ve observed when the containers come up and it works fine, but this strikes me as a bad and easily breakable solution. If I instead set this value to db (the container name and the label for the service in my service .yml file in /var/lib/rancher/conf/firefly.yml) or mariadb (the container’s hostname internally) it just can’t find the db. Any way around this?

What I did when I was running them manually was create a Docker Network and add them both to it, that way I could assign static IPs. But ros service doesn’t seem to like it when I try to specify networks in docker-compose format.

The way I see it, I need one of two things:

  1. A way to get system services automatically configured with static IPs on a separate docker network
  2. To figure out why one container can’t resolve the other by its container name or hostname.