Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change schalchemy URI according to the env variables #20

Open
pareyesv opened this issue Feb 8, 2022 · 0 comments
Open

feat: change schalchemy URI according to the env variables #20

pareyesv opened this issue Feb 8, 2022 · 0 comments

Comments

@pareyesv
Copy link
Collaborator

pareyesv commented Feb 8, 2022

return create_engine("postgresql://data:dataviz@localhost:5432/carbolytics",

One possibility is to include an env var SQLALCHEMY_DATABASE_URI based on other env vars. Example:

SQLALCHEMY_DATABASE_URI="postgresql+psycopg2://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_ADDRESS}:${POSTGRES_PORT}/${POSTGRES_DBNAME}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant