-
Notifications
You must be signed in to change notification settings - Fork 450
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
Allow remote database configuration #207
Allow remote database configuration #207
Conversation
…ackend into amazon-rds-for-deployable-envs
… into amazon-rds-for-deployable-envs
Although the work in this PR works, this probably needs some cleanup, because it has code I did during GSoC 2018. Please review this when you can @m-murad @ramitsawhney27 Also, commits are unsquashed, because I'm planning to squash in the end. Just so I know the history of the commits while working on this. |
Ups, I think I'm missing adding the environment variables on the |
Yes, it should be done in this PR. |
done the |
… into anitab-org#87-allow-remote-database-configuration
I got this error today when I tried to register a new user on the Postgres db instance I created a while ago. Although the changes were done, it took a while to see it reflected and I got the internal server error 500.
|
@m-murad and I tested this in a community open session today, and we got only the error from email setup to send emails (which is related to issue #233 ). Regarding the problem mentioned in the comment above #207 (comment) can be explained by the server being disconnected sometimes from the PostgresSQL instance being used for development purposes. This can be caused by the "quality" of the instance (e.g.: not having a lot of memory, being used by multiple applications). Some potential explanations (after googling):
We decided to still merge this because using this free instance for remote database (even if the connection between database and server fails sometimes) can bring more benefits then the hassle of having the database deleted every time a new merge is done. cc @mayburgos |
* chore: allow amazon rds database usage * feat: 3 environments access mysqldb * updated requirements.txt and addedurl for staging db * updated requirements.txt * feat: update config to support any type of remote database * fix: build_uri functioon and test * fix: remove dependency causing build fail * Update deploy.sh to add more env variables
* chore: allow amazon rds database usage * feat: 3 environments access mysqldb * updated requirements.txt and addedurl for staging db * updated requirements.txt * feat: update config to support any type of remote database * fix: build_uri functioon and test * fix: remove dependency causing build fail * Update deploy.sh to add more env variables
Description
{db_type}://{db_user}:{db_password}@{db_endpoint}/{db_name}
:DevelopmentConfig
but meant to run only on a local configuration using a SQLite database.Followed example for Database URI for a MySQL database from this blog post: https://medium.com/@rodkey/deploying-a-flask-application-on-aws-a72daba6bb80
I also checked the documentation.
Continuation of previous PR #89 . (I couldn't reopen on GitHub because the base branch was deleted, and I wasn't allowed to change the base branch)
Fixes #87
Type of Change:
Code/Quality Assurance Only
How Has This Been Tested?
Ran pre-existing tests and new ones with
python -m unittest discover tests
Switched configurations between
local
anddev
:dev
environment I set up the above-mentioned variables, with values from a test database from PostgreSQL as a Service called ElephantSQL (I used free plan). Slack message mentioning this servicelocal
environment, I didn't have to set those variables, since the app is setup to create a local sqlite database.Checklist:
Code/Quality Assurance Only