rommapp / romm

A beautiful, powerful, self-hosted rom manager
https://romm.app
GNU Affero General Public License v3.0
2.33k stars 95 forks source link

[Bug] Missing database credentials, check your environment variables! #1291

Open matthias-hoste opened 1 day ago

matthias-hoste commented 1 day ago

RomM version latest

Describe the bug I use the default docker-compose.yml example. First with changes to use my already running mysql server which gave the error that it cant find the database credentials. Then I tried the example yml directly with it's included mysql server which also gave this error. I'm using portainer

To Reproduce Create a new stack in portainer, use example docker yml

Expected behavior Starts up fine

gantoine commented 1 day ago

Can you post your docker-compose?

matthias-hoste commented 20 hours ago

`version: "3"

volumes: mysql_data: romm_resources: romm_redis_data:

services: romm: image: rommapp/romm:latest container_name: romm restart: unless-stopped environment:

gantoine commented 19 hours ago

And you've set both DB_PASSWD and MYSQL_PASSWORD to something, since they can't be empty?

matthias-hoste commented 9 hours ago

Yeah

gantoine commented 5 hours ago

Hmmm the code with that check should pass in this case, unless you have a whitespace after the =?

if not DB_USER or not DB_PASSWD:
                log.critical(
                    "Missing database credentials, check your environment variables!"
                )
                sys.exit(3)
matthias-hoste commented 4 hours ago

Nope, added the password directly after the =. It's really weird. It's as if the env vars are not passed at all

gantoine commented 2 hours ago

any chance it has to do with indentation, make sure the yaml is correct by pasting it in a web verifier?