How to supply adlists in docker-compose file?

I managed to get docker and the pihole image working on my pi with the following docker-compose file:

version: '3.6'
services:
  pihole:
    image: pihole/pihole:v5.8.1
    container_name: pihole
    restart: always
    hostname: pihole
    volumes:
      - ./pihole/pihole/:/etc/pihole/
      - ./pihole/dnsmasq.d/:/etc/dnsmasq.d/
      #- ./pihole/log/:/var/log/ #This is not working for some reason, have to look into it. 
    cap_add:
      - NET_ADMIN
    environment:
      - ServerIP=192.168.1.150
      - TZ=Europe/Berlin
      - PIHOLE_DNS_=1.1.1.1
      - WEBPASSWORD=SomePassword #Replace this
    network_mode: "host"

    #Figure out a way to also add blocklists

Seems to work pretty good! But I am wondering if there is also a way to supply black, white and adlists directly in the docker-compose file somehow? This way it would be seamless to launch new containers, update and so on and not having to ad my domains manually everytime.

I found som old post doing something like this

    volumes:
          './adlists.list:/etc/pihole/adlists.list'

But that does not work for me. Not sure where to put my file.

Edit:

After much searching it seems that since version 5 gravity is now using a db instead of file. There is a tool for it:
https://github.com/jessedp/pihole5-list-tool#pihole5-list-tool

Really a shame that its not possible to specify a list or something in the docker-compose.

Is there any official stance on this?

As it currently stands, I'm guessing the best solution is to have some script run some docker exec commands updating the underlying database.
A bit unfortunate that docker-compose up doesn't suffice at the moment.

So, there is a way to configure everything without the guy, but it still needs as of today manipulating the gravity.db:

$ tree dns/
dns/
├── docker-compose.yml
├── Dockerfile
└── rootfs
    ├── etc
    │   └── s6-overlay
    │       └── s6-rc.d
    │           ├── _custom_configs
    │           │   ├── type
    │           │   └── up
    │           ├── _startup
    │           │   └── dependencies.d
    │           │       └── _custom_configs
    │           └── user
    │               └── contents.d
    │                   └── _custom_configs
    └── usr
        └── local
            └── bin
                └── _custom_configs.sh

$ cat dns/Dockerfile 
FROM pihole/pihole:latest

COPY rootfs /

$ cat dns/rootfs/etc/s6-overlay/s6-rc.d/_custom_configs/up
#!/command/execlineb
background { bash -e /usr/local/bin/_custom_configs.sh }

$ cat dns/rootfs/usr/local/bin/_custom_configs.sh
#!/bin/bash

gravityDBfile="/etc/pihole/gravity.db"

# Add a custom adlist
pihole-FTL sqlite3 -ni "${gravityDBfile}" "INSERT INTO \"adlist\" (address) VALUES ('https://nsfw.oisd.nl');"

# Custom blocklist for a custom group
pihole-FTL sqlite3 -ni "${gravityDBfile}" "INSERT INTO \"group\" (id, name) VALUES (3, 'My-Custom-Group');"
pihole-FTL sqlite3 -ni "${gravityDBfile}" "INSERT INTO \"client\" (id, ip) VALUES (1, '00:11:22:33:44:55');"
pihole-FTL sqlite3 -ni "${gravityDBfile}" "INSERT INTO \"client_by_group\" (client_id, group_id) VALUES (1, 3);"
pihole-FTL sqlite3 -ni "${gravityDBfile}" "INSERT INTO \"domainlist\" (id, type, domain) VALUES (1, 3, '(\.|^)local\$');"
pihole-FTL sqlite3 -ni "${gravityDBfile}" "UPDATE \"domainlist_by_group\" SET group_id = 3 WHERE domainlist_id = 1;"

# Custom blocklist for everyone
pihole-FTL sqlite3 -ni "${gravityDBfile}" "INSERT INTO \"domainlist\" (id, type, domain) VALUES (2, 1, 'wpad.custom.local');"