superset icon indicating copy to clipboard operation
superset copied to clipboard

start of production no possible due to errors in docker-compose-non-dev.yml and docker/.env

Open matsvitt opened this issue 8 months ago • 3 comments

Bug description

Hi there,

I tried to spin up the prod version with docker-compose-non-dev.yml from the current master branch and get two problems: The call

docker compose -f docker-compose-non-dev.yml up -d

results in the error: validating docker-compose-non-dev.yml: services.db.env_file.0 must be a string

So I changed the env file entries on the docker-compose file to:

env_file: ./docker/.env-non-dev

The the spin up works however when I try to create a new admin user using

docker exec superset_app superset fab create-admin

I see that the database connection is refused? The reason seems to be that the docker/.env file sets DATABASE_HOST = db. However the database service “db” defined inside the docker-compose-non-dev.yml is set to superset_db. After I adjusted the entry in docker/.env to

DATABASE_HOST=superset_db

the superset service works fine. Did I miss anything in order to prepare the spinup for production? Did I overlook anything?

How to reproduce the bug

  1. checkout the master branch.
  2. run docker compose -f docker-compose-non-dev.yml up -d
  3. run docker exec -it superset_app superset fab create-admin

Screenshots/recordings

The startup of the prod service using docker compose -f docker-compose-non-dev.yml gives this error:

validating docker-compose-non-dev.yml: services.db.env_file.0 must be a string

Upon the creation of a new admin user the error is:

2024-06-19 16:37:17,703:DEBUG:superset.utils.logging_configurator:logging was configured successfully 2024-06-19 16:37:17,718:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) connection to server at "db" (10.0.1.231), port 5432 failed: FATAL: password authentication failed for user "superset"

Superset version

master / latest-dev

Python version

Not applicable

Node version

Not applicable

Browser

Not applicable

Additional context

No response

Checklist

  • [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

matsvitt avatar Jun 19 '24 16:06 matsvitt