Gitlab-CE reverse proxy config using docker-compose

Gitlab CE is running in it’s own docker container fine. Enabling the registry and adding a separate port seems to be OK too.

Problematic is the nginx['proxy_set_headers'] config: All nginx variables starting with a $ sign don’t end up in the generated config!

web:
  image: 'gitlab/gitlab-ce:latest'
  restart: always
  hostname: '<hostname>'
  environment:
    GITLAB_OMNIBUS_CONFIG: |
      external_url 'https://<hostname>
      gitlab_rails['lfs_enabled'] = true
      nginx['listen_port'] = 80
      nginx['listen_https'] = false
      nginx['proxy_set_headers'] = { "Host" => "$http_host",  "X-Real-IP" => "$remote_addr",  "X-Forwarded-For" => "$proxy_add_x_forwarded_for",  "X-Forwarded-Proto" => "https",  "X-Forwarded-Ssl" => "on" }
      nginx['real_ip_trusted_addresses'] = [ '172.17.0.0/16' ]
      nginx['real_ip_header'] = 'X-Real-IP'
      nginx['real_ip_recursive'] = 'on'

Any ideas how to get around that would be appreciated!