-
Notifications
You must be signed in to change notification settings - Fork 0
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
#159396311 Configure heroku deployment #1
Conversation
@solnsubuga The assets (JavaScript/CSS/Images) don't appear to be working on the deployed instance. |
1e6e813
to
02dcb84
Compare
02dcb84
to
06e83a7
Compare
@lym static files are removed after deploying. Am looking for a fix. |
06e83a7
to
792615b
Compare
@lym I have fixed the assets issue. Here is the deployed instance: https://wger-bs-staging.herokuapp.com/en/software/features |
@solnsubuga The link to the story, in your PR description is broken. Please rectify this. |
.travis.yml
Outdated
@@ -15,16 +15,15 @@ sudo: false | |||
# Python versions to test | |||
python: | |||
- "2.7" | |||
- "3.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you disable testing against Python3.4?
.travis.yml
Outdated
- TEST_MOBILE=True DB=postgresql TRAVIS_NODE_VERSION="4" | ||
- TEST_MOBILE=True DB=sqlite TRAVIS_NODE_VERSION="4" | ||
- TEST_MOBILE=False DB=postgresql TRAVIS_NODE_VERSION="4" | ||
- TEST_MOBILE=False DB=sqlite TRAVIS_NODE_VERSION="4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you getting rid of these?
|
||
# Javascript linting | ||
- gulp lint | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add these checks back.
requirements.txt
Outdated
python-decouple==3.1 | ||
dj-database-url==0.5.0 | ||
psycopg2-binary==2.7.5 | ||
whitenoise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please lock whitenoise to a specific version.
settings.py
Outdated
TEMPLATES[0]['OPTIONS']['debug'] = True | ||
|
||
ADMINS = ( | ||
('Your name', 'your_email@example.com'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add yourself as an admin here.
settings.py
Outdated
} | ||
|
||
# Make this unique, and don't share it with anybody. | ||
SECRET_KEY = 'yu==q%107qo(dm#m%x75(wo$6!l!uo!gskog6**kvssg^%(8_h' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should store and retrieve this from and environment variable.
@@ -28,7 +28,8 @@ | |||
from wger.utils.pdf import styleSheet | |||
from wger.utils.pdf import render_footer | |||
|
|||
from reportlab.lib.pagesizes import A4, cm | |||
from reportlab.lib.pagesizes import A4 | |||
from reportlab.lib.units import cm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are changes to this file relevant to your task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That change was necessary in order to run the application. It was bug, variable cm was being imported from the wrong package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
792615b
to
c717f74
Compare
7e400ac
to
d794927
Compare
@@ -28,7 +28,8 @@ | |||
from wger.utils.pdf import styleSheet | |||
from wger.utils.pdf import render_footer | |||
|
|||
from reportlab.lib.pagesizes import A4, cm | |||
from reportlab.lib.pagesizes import A4 | |||
from reportlab.lib.units import cm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
wger/settings_global.py
Outdated
@@ -28,6 +28,9 @@ | |||
BASE_DIR = os.path.abspath(os.path.dirname(__file__)) | |||
SITE_ROOT = os.path.realpath(os.path.dirname(__file__)) | |||
|
|||
SECRET_KEY = os.environ.get( | |||
"SECRET_KEY", 'M34Ivcwrw34343Jr1hp7YzS29nVCiWqT4MgpxHSfiXNzPI5oSP8uLYXOIZ') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't add a default. Let's force everyone to retrieve it from the environment. This way, all devs will have to set it by themselves and then we also have to update things like TravisCI and Heroku to include this environment variable.
This is the standard practice for things as sensitive as this.
d794927
to
e410388
Compare
2c4fb64
to
8909bfb
Compare
LGTM |
What does this PR do?
This PR sets up deployment on heroku.
Description of Task to be completed?
How should this be manually tested?
postgres dyno
DB
to beheroku
https://github.com/solnsubuga/heroku-buildpack-python
heroku/nodejs
buildpack as well.ft-heroku-deployment-159396311
to your app.What are the relevant pivotal tracker stories?
#159396311
Screenshots (if appropriate)