Deploy Dashboard without config.json

Can Dashboard be deployed without using the config.json file? And more specifically entirely configured through Docker Compose definition?

All published ways mount a volume containing this file to the /src/Parse-Dashboard/parse-dashboard-config.json. The description on the official image Docker Hub page only states:

On the same page, under the Configure Parse Dashboard section, it has 1 sub-section titled “File”, which is the above config.json file.
The 2nd sub-section is Environment Variables, which it says must be passed into the parse-dashboard binary / executable.

Not as environment variables to my Docker container’s creation parameters (i.e. docker run ... ). So I dont think they are the same thing…

My intention is to deploy multiple Parse instances onto the same host, which must have unique port numbers, so the accompanying Dashboard will also need repointing to this custom port number. Ideally, passing it in at container creation, via docker-compose.yml and O/S based environment variables is ideal, rather than editing the contents of a config.json file, the same as when deploying the parse-server container.

I’m using this config in docker-compose.yml:

image: parseplatform/parse-dashboard
  driver: "json-file"
    max-size: "200k"
    max-file: "10"
  HOST: ""
  PORT: 4040
  PARSE_DASHBOARD_TRUST_PROXY: undefined // Or "1" to trust connection info from a proxy's X-Forwarded-* headers

@santiagosemhan, thanks

Yes, I had very similar content. What I think I changed & realised from your config:

  • PORT. this should actually be hard-coded to 4040, as the above “ports” section specifies the externally published port forwarder which the inside interface is 4040. I had it also set to my variable dashboard port number.

  • PARSE_DASHBOARD_TRUST_PROXY or PARSE_DASHBOARD_ALLOW_INSECURE. It errors with your config of having values for both, so I am intrigued by this (tried undefined and 1)

I previously had TRUST_PROXY but swapped to ALLOW_INSECURE only and with the PORT change, the dashboard loads now.

I have tested my intention to handle random port allocations, by copying my configuration to a new / random port number and a counterpart dashboard container can connect to the parse server containers and loads successfully.

1 Like