Can't integrate balena-pihole

I want to integrate balena-pihole into my existing balena-MagicMirror installation. But I can’t integrate it.

See the attached docker-compose.yml below.
The ./balena-pihole exists as a git submodule

version: '2.1'

volumes:
  pihole_config:
  dnsmasq_config:

services:
  # https://github.com/balena-io-projects/balena-wpe
  Browser:
    restart: always
    build: ./balena-wpe
    privileged: true
    network_mode: host
    environment:
      INITSYSTE: "on"
      WPE_URL: "http://localhost:90"
    healthcheck:
      test: "wget -O /dev/null http://localhost:90; if [ 0 != $? ]; then exit 1; fi;"
    depends_on:
      - mm
  mm:
    restart: always
    build: ./MagicMirror
    privileged: true
    network_mode: host
    depends_on:
      - pihole
  # https://github.com/klutchell/balena-pihole
  pihole:
    build: ./balena-pihole

The balena-cli tool gives me the following error: Could not detect project type: Resolution could not be performed category

Hello there,

Just to ensure we’re talking about the same thing, you’re trying a balena push to our builders, correct?

As long as the submodule has been correctly cloned (via for example a --recursive clone of your main project) and is present in the local directory, then this should be sent to our Builder to build. Just to check, the balena-pihole submodule is definitely cloned and present?

If this is the case, please let us know and we’ll try and reproduce the issue here.

Best regards, Heds

Hi @hedss,

Yes, I am performing a balena push to your builders. I just realized, that I redefined the volumes property. It is part of the pihole property. I will remove it when I am at home and try again.

The submodule is correctly cloned, it has no sub-submodules, but I will double check it when I am at home.

@hedss I am unable to get this to work. The balena-pihole submodule is cloned and present, just like the balena-wpe which works flawlessly.

I also removed the re-defined volumes property without any success.

@idoodler my suspicion here is that you’re expecting balena-pihole to build as a submodule as it stands, which it will not as the project does not have a Dockerfile in the root directory. You can try changing your docker-compose.yml file to include the pihole section from the balena-pihole/docker-compose.yml and updating the build directory to ./balena-pihole/pihole. You’ll also need to keep the volumes, something like this:

version: '2.1'

volumes:
  pihole_config:
  dnsmasq_config:

services:
  # https://github.com/balena-io-projects/balena-wpe
  Browser:
    restart: always
    build: ./balena-wpe
    privileged: true
    network_mode: host
    environment:
      INITSYSTE: "on"
      WPE_URL: "http://localhost:90"
    healthcheck:
      test: "wget -O /dev/null http://localhost:90; if [ 0 != $? ]; then exit 1; fi;"
    depends_on:
      - mm
  mm:
    restart: always
    build: ./MagicMirror
    privileged: true
    network_mode: host
    depends_on:
      - pihole
  # https://github.com/klutchell/balena-pihole
  pihole:
    build: ./balena-pihole/pihole
    privileged: true
    volumes:
      - 'pihole_config:/etc/pihole'
      - 'dnsmasq_config:/etc/dnsmasq.d'
    cap_add:
      - 'NET_ADMIN'
    dns:
      - '127.0.0.1'
      - '1.1.1.1'
    network_mode: host
1 Like

This is the solution. I thought its possible to just link togeather the services and the linked services basically just get merged into the root docker-composer.yml.

Thanks!