Can't set upstream dns server in docker-compose.yml

I guess I am missing something, but I cannot get pihole to utilize the upstream dns server from the environment variable in my docker compose.
What am I doing wrong?

First this is on a QNAP server using container station.
Here is the environment section of the compose file.
environment:
- "PIHOLE_DNS_1=192.168.50.53"
- "PIHOLE_DNS_2=9.9.9.11"

when i connect to the container and look at /etc/pihole/setupVars.conf I see:
PIHOLE_INTERFACE=eth0
IPV4_ADDRESS=0.0.0.0
IPV6_ADDRESS=0:0:0:0:0:0
PIHOLE_DNS_1=8.8.8.8
QUERY_LOGGING=true
INSTALL_WEB_SERVER=true
INSTALL_WEB_INTERFACE=true
LIGHTTPD_ENABLED=true
PIHOLE_DNS_2=
CACHE_SIZE=10000
DNS_FQDN_REQUIRED=true
DNS_BOGUS_PRIV=true
DNSMASQ_LISTENING=local

I have to set it in the gui on every restart.

Oh, i'll create another thread for this but
teleporter doesn't save the upstream dns server info either

That won't work.
It is PIHOLE_DNS_ that would accept a list of your desired DNS upstreams - see Pi-hole's Docker documentation:

Variable Default Value Description
PIHOLE_DNS_ 8.8.8.8;8.8.4.4 IPs delimited by ; Upstream DNS server(s) for Pi-hole to forward queries to, separated by a semicolon (supports non-standard ports with #[port number]) e.g 127.0.0.1#5053;8.8.8.8;8.8.4.4 (supports Docker service names and links instead of IPs) e.g upstream0;upstream1 where upstream0 and upstream1 are the service names of or links to docker services. Note: The existence of this environment variable assumes this as the sole management of upstream DNS. Upstream DNS added via the web interface will be overwritten on container restart/recreation

This sounds like you didn't mount the necessary directories for your container.
Check your container's respective configuration against Pi-hole's sample configuration for Docker.

You should also consider to set the recommended FTLCONF_LOCAL_IPV4 to your Docker host's IP.

Doh.
Thank you