Satellite does not respect database URL?

I have the docker services storj_postgres and storj_satellite in my compose file. For the satellite, the STORJ_DATABASE env is set to ‘postgres://postgres:passwordhere@storj_postgres/satellite?sslmode=disable’. Usually that connects to the storj_postgres service container, but for some reason the satellite seems to connect to localhost:

storj_satellite_1      | 2020-02-12T22:39:15.444Z	INFO	Configuration loaded from: /root/.local/share/storj/satellite/config.yaml
storj_satellite_1      | 2020-02-12T22:39:15.457Z	DEBUG	db	Connected to:	{"db source": "postgres://postgres:2aiFrcrwPweAoxrL947iqoYrTbqDV3yLU6br4dSmpz7@storj_postgres/satellite?sslmode=disable&application_name=Satellite"}
storj_satellite_1      | 2020-02-12T22:39:15.459Z	DEBUG	Unrecoverable error	{"error": "Error creating revocation database: dial tcp 127.0.0.1:5432: connect: connection refused", "errorVerbose": "Error creating revocation database: dial tcp 127.0.0.1:5432: connect: connection refused\n\tmain.cmdRun:214\n\tstorj.io/storj/pkg/process.cleanup.func1.2:307\n\tstorj.io/storj/pkg/process.cleanup.func1:325\n\tgithub.com/spf13/cobra.(*Command).execute:826\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:914\n\tgithub.com/spf13/cobra.(*Command).Execute:864\n\tstorj.io/storj/pkg/process.ExecWithCustomConfig:84\n\tstorj.io/storj/pkg/process.ExecCustomDebug:66\n\tmain.main:455\n\truntime.main:203"}
storj_satellite_1      | Error: Error creating revocation database: dial tcp 127.0.0.1:5432: connect: connection refused

Why does this happen? Is this a bug?

Environment variables usually handled in the entrypoint script. Do you have one in your image?

I am using storjlabs/satellite version 0.33.2 with pretty much the same setup as in the docker compose file on the GitHub repo. I can try editing the configuration file instead.

Afaik this versions has not yet been released or deployed. The current release is 0.31.12

The config.yaml file contains the correct postgres address, so it seems that the environment variables are applied correctly. I’ll try the current version.

EDIT: 0.31.12 has the same issue.

It does seem like a bug. Does anyone know what I am doing wrong here?

Further discussion here: https://github.com/storj/storj/issues/3782