You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "john-bodley (via GitHub)" <gi...@apache.org> on 2023/08/22 14:32:35 UTC

[GitHub] [superset] john-bodley commented on a diff in pull request #25055: fix: docker-compose non-dev

john-bodley commented on code in PR #25055:
URL: https://github.com/apache/superset/pull/25055#discussion_r1301744034


##########
docker/pythonpath_dev/superset_config.py:
##########
@@ -28,18 +28,18 @@
 
 logger = logging.getLogger()
 
-DATABASE_DIALECT = os.getenv("DATABASE_DIALECT", "postgresql")
-DATABASE_USER = os.getenv("DATABASE_USER", "superset")
-DATABASE_PASSWORD = os.getenv("DATABASE_PASSWORD", "superset")
-DATABASE_HOST = os.getenv("DATABASE_HOST", "db")
-DATABASE_PORT = os.getenv("DATABASE_PORT", "5432")
-DATABASE_DB = os.getenv("DATABASE_DB", "superset")
-
-EXAMPLES_USER = os.getenv("EXAMPLES_USER", "examples")
-EXAMPLES_PASSWORD = os.getenv("EXAMPLES_PASSWORD", "examples")
-EXAMPLES_HOST = os.getenv("EXAMPLES_HOST", "db")
-EXAMPLES_PORT = os.getenv("EXAMPLES_PORT", "5432")
-EXAMPLES_DB = os.getenv("EXAMPLES_DB", "examples")
+DATABASE_DIALECT = os.getenv("DATABASE_DIALECT")

Review Comment:
   I think this is acceptable. The only other formulation I can think is having Python parse the `.env-non-dev` file to read the fallbacks from there. It seems like the file adheres to the [configparser](https://docs.python.org/3/library/configparser.html) format.



##########
docker/.env-non-dev:
##########
@@ -21,11 +21,17 @@ DATABASE_DB=superset
 DATABASE_HOST=db
 DATABASE_PASSWORD=superset
 DATABASE_USER=superset
+DATABASE_PORT=5432
+DATABASE_DIALECT=postgresql
+
+EXAMPLES_DB=examples
+EXAMPLES_HOST=db
+EXAMPLES_USER=examples
+EXAMPLES_PASSWORD=examples
+EXAMPLES_PORT=5432
 
 # database engine specific environment variables
 # change the below if you prefer another database engine
-DATABASE_PORT=5432

Review Comment:
   Nice!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org