Bookstack is unable to connect to MariaDB

I’ve been attempting to install Bookstack with the following docker compose configuration, somewhat based off of this example. Note that I have a couple of other services running on the same computer at the same time, so the database port has been changed to 3136 instead of the default 3036:

---
version: "2"

volumes:
  app:
  db:

services:
  app:
    image: lscr.io/linuxserver/bookstack
    environment:
      - PUID=1000
      - PGID=1000
      - APP_URL=https://wiki.[hostname].local
      - DB_HOST=db
      - DB_PORT=3136
      - DB_USER=bookstack
      - DB_PASS=[password]
      - DB_DATABASE=bookstackapp
    volumes:
      - app:/config
    ports:
      - 6875:80
    restart: unless-stopped
    depends_on:
      - db

  db:
    image: lscr.io/linuxserver/mariadb
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=[root password]
      - TZ=America/Chicago
      - MYSQL_DATABASE=bookstackapp
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD=[password]
    ports:
      - 3136:3306
    volumes:
      - db:/config
    restart: unless-stopped

However, in doing so, the app container itself seems unable to connect to the database, at least according to these logs:

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1000
User GID:    1000
───────────────────────────────────────
using keys found in /config/keys
App Key found - setting variable for seds
Running config - DB_HOST set
**** APP_URL in /config/www/.env is being updated from https://wiki.[hostname].com to https://wiki.[hostname].local ****
**** If this is an existing install, you should run the following line from your host terminal to update the database URL entries: ****
************************************************************************
docker exec -it bookstack php /app/www/artisan bookstack:update-url https://wiki.[hostname].com https://wiki.[hostname].local
************************************************************************
Waiting for DB to be available
   Illuminate\Database\QueryException 
  SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = bookstackapp and table_name = migrations and table_type = 'BASE TABLE')
  at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
    756▕         // If an exception occurs when attempting to run a query, we'll format the error
    757▕         // message to include the bindings with SQL, which will make this exception a
    758▕         // lot more helpful to the developer instead of just the database's errors.
    759▕         catch (Exception $e) {
  ➜ 760▕             throw new QueryException(
    761▕                 $query, $this->prepareBindings($bindings), $e
    762▕             );
    763▕         }
    764▕     }
      +39 vendor frames 
  40  /app/www/artisan:35
      Illuminate\Foundation\Console\Kernel::handle()
[custom-init] No custom files found, skipping...
[ls.io-init] done.

Just in case, I’ve added port 3136 into the UFW firewall, but still, no luck:

$ sudo ufw status numbered
Status: active

     To                         Action      From
     --                         ------      ----
// Snip
[ 2] 3306                       ALLOW IN    Anywhere
[ 3] 80,443/tcp                 ALLOW IN    Anywhere
// Snip
[15] 3306/tcp                   ALLOW IN    Anywhere
// Snip
[17] 6465                       ALLOW IN    Anywhere
// Snip
[21] 3136/tcp                   ALLOW IN    192.168.0.0/24
[22] 3136/tcp                   ALLOW IN    10.10.10.0/24
[23] 3136/tcp                   ALLOW IN    Anywhere
// Snip
[25] 80,443/tcp (v6)            ALLOW IN    Anywhere (v6)
// Snip
[33] 3306 (v6)                  ALLOW IN    Anywhere (v6)
[34] 3306/tcp (v6)              ALLOW IN    Anywhere (v6)
// Snip
[36] 6465 (v6)                  ALLOW IN    Anywhere (v6)
// Snip
[39] 3136/tcp                   ALLOW IN    fd08:4711::1/64
[40] 3136/tcp (v6)              ALLOW IN    Anywhere (v6)

Obviously, the line, SQLSTATE[HY000] [2002] Connection refused is suspicious to me, and I’m thinking the reason is due to something in the app configuration not being able to connect to the db, but I can’t figure out why. Any ideas?