Closed looselycoupled closed 7 years ago
See the environment variables set in the .travis.yml file
On Thursday, June 2, 2016, Allen Leis notifications@github.com wrote:
The various environment settings files lack the proper database settings. Perhaps we should define it in the base.py file to use ENV variables (pulled from the .env file).
This might be accomplished by copying the version from test.py and then modifying it to use the env variables.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DistrictDataLabs/trinket/issues/61, or mute the thread https://github.com/notifications/unsubscribe/AAth7v6ojsteCU9rz5dyahh1BxOcQVHHks5qHzfdgaJpZM4Is7iZ .
Sent from Gmail Mobile
@looselycoupled I checked the travis yaml file and there is only one database setting: DATABASE_URL
.
The dev README shows adding a line to the .ENV file for this setting:
DATABASE_URL=postgres://<insertDBUSERNAME>:<insertDBUSERPASSWORD>@127.0.0.1:5432/<insertDBNAME>
Otherwise, I checked the testing.py settings file, and I see the following settings are being pulled from ENV variables:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': environ_setting('DB_NAME', 'trinket'),
'USER': environ_setting('DB_USER', 'postgres'),
'PASSWORD': environ_setting('DB_PASS', ''),
'HOST': environ_setting('DB_HOST', 'localhost'),
'PORT': environ_setting('DB_PORT', '5432'),
},
}
Could you clarify what the intent of this ticket is (e.g., to add something additional to documentation regarding that DATABASE_URL string or to add the database settings to the base.py file from testing.py)?
Closed via #93.
For Heroku compatibility, the database connection should be an ENV string. Per @bbengfort's comment below see the travis yaml file for example usage and update the docs to reflect.