Sharing and WebDAV links showing as localhost behind nginx and docker

Hi guys,

I’m using the official docker image with a slightly modified docker-compose file:


volumes:
  nextcloud:
  apps:
  config:
  db:

services:
  db:
    image: mariadb
    container_name: nextcloud_db
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=redacted
      - MYSQL_PASSWORD=redacted
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  app:
    image: nextcloud
    container_name: nextcloud
    ports:
      - 8050:80
    links:
      - db
    volumes:
      - nextcloud:/var/www/html
      - apps:/var/www/html/custom_apps
      - config:/var/www/html/config
      - /mnt/raid/next-cloud/data:/var/www/html/data
    restart: always
``

This is then proxied via nginx:

``server {
        listen 443 ssl http2;
        listen [::]:443 ssl http2;
        include /etc/nginx/ssl.conf;
        server_name data.redacted.co.uk;
        location / {
                proxy_pass http://localhost:8050;
        }
}

I’ve changed my config.php to have the following:

$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\wMemcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'redacted',
  'passwordsalt' => 'redacted',
  'secret' => `redacted',
  'trusted_domains' => 
  array (
    0 => 'localhost:8050',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '15.0.0.10',
  'overwrite.cli.url' => 'https://data.redacted.co.uk',
  'dbname' => 'nextcloud',
  'dbhost' => 'nextcloud_db:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'redacted',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
);

But all of the share links and WebDAV links are showing up as http://localhost:8050/... which is obviously incorrect. How do I change this?