inbox-zero icon indicating copy to clipboard operation
inbox-zero copied to clipboard

Docker-compose.yml requires compose v2 (Readme issue) / .env path mismatch (environment specific?) in docker-compose

Open milankubin opened this issue 7 months ago • 3 comments

https://github.com/elie222/inbox-zero/blob/1f3bb2b3f486ffa393430c4547d4b2c0fee6e466/docker-compose.yml#L45

Running on Debian, docker-compose.yml does not work on v1.x versions of compose (Default for any Debian stable release):

└╼milan$docker-compose up -d 
ERROR: The Compose file './../../docker-compose.yml' is invalid because:
'name' does not match any of the regexes: '^x-'

Had to install docker-compose v2 from experimental branch, then:

docker-compose up -a

now becomes

docker compose up -a

produces the following error

WARN[0000] The "UPSTASH_REDIS_TOKEN" variable is not set. Defaulting to a blank string. 
WARN[0000] The "UPSTASH_REDIS_TOKEN" variable is not set. Defaulting to a blank string. 
env file <omitted_local_path>/inbox-zero/.env not found: stat <omitted_local_path>/inbox-zero/.env: no such file or directory

Updating aforementioned line in docker-compose to use './apps/web/.env' fixed the issue.

milankubin avatar Apr 13 '25 12:04 milankubin

Hi @elie222, I've opened PR #411 to address the env_file path confusion mentioned in this issue. It changes the docker-compose.yml file to point the web service's env_file directly to apps/web/.env, simplifying the setup for Docker users.

vishalmakwana111 avatar Apr 20 '25 11:04 vishalmakwana111

I just ran into the UPSTASH_REDIS_TOKEN issue when installing locally. The specific issue, as I understand it, is that the docker-compose.yml file looks to the "root" environment for variables, not the apps/web/.env environment. I think this can be

I addressed it with a quick short-term fix:

export UPSTASH_REDIS_TOKEN=token-string-here

And then I created a .env at the root level of the project with the UPSTASH_REDIS_TOKEN env variable.

That seems to work on a restart of the docker container, but I'm not convinced it's not relying on the old env var.

eethann avatar Jul 22 '25 13:07 eethann

The file apps/web/.env does NOT exist in the repository which breaks the compose file - this should exist and contain reasonable defaults. Currently it points to a non existing file and breaks the config:

❯ docker compose config
WARN[0000] The "UPSTASH_REDIS_TOKEN" variable is not set. Defaulting to a blank string.
WARN[0000] The "UPSTASH_REDIS_TOKEN" variable is not set. Defaulting to a blank string.
env file /home/karol.kozlowski/wa/inbox-zero/apps/web/.env not found: stat /home/karol.kozlowski/wa/inbox-zero/apps/web/.env: no such file or directory

As a result it breaks any form of managing multiple compose files (overrides) described in the official documentation: https://docs.docker.com/compose/how-tos/multiple-compose-files/

I've opened #954 to address this.

KarolKozlowski avatar Nov 12 '25 12:11 KarolKozlowski