You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-2Lines changed: 40 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -248,6 +248,44 @@ To shell
248
248
docker-compose run django python manage.py shell
249
249
```
250
250
251
-
## Heroku
251
+
## Deployment
252
252
253
-
The project is ready to be deployed on Heroku. There's a current deployment that can be found - <https://hacksoft-styleguide-example.herokuapp.com/>
253
+
This project is ready to be deployed either on **Heroku** or **AWS ECS**.
254
+
255
+
### Heroku
256
+
257
+
Deploying a Python / Django application on Heroku is quite straighforward & this project is ready to be deployed.
258
+
259
+
To get an overview of how Heroku deployment works, we recommend reading this first - <https://devcenter.heroku.com/articles/deploying-python>
260
+
261
+
There's a current deployment that can be found here - <https://hacksoft-styleguide-example.herokuapp.com/>
262
+
263
+
**Files related to Heroku deployment:**
264
+
265
+
1.`Procfile`
266
+
- Comes with default `web`, `worker` and `beat` processes.
267
+
- Additionally, there's a `release` phase to run migrations safely, before releasing the new build.
268
+
1.`runtime.txt`
269
+
- Simply specifies the Python version to be used.
270
+
1.`requirements.txt`
271
+
- Heroku requires a root-level `requirements.txt`, so we've added that.
272
+
273
+
**Additionally, you need to specify at least the following settings:**
274
+
275
+
1.`DJANGO_SETTINGS_MODULE`, usually to `config.django.production`
276
+
1.`SECRET_KEY` to something secret. [Check here for ideas](https://stackoverflow.com/questions/41298963/is-there-a-function-for-generating-settings-secret-key-in-django).
277
+
1.`ALLOWED_HOSTS`, usually to the default heroku domain (for example - `hacksoft-styleguide-example.herokuapp.com`)
278
+
279
+
On top of that, we've added `gunicorn.conf.py` with some example settings.
280
+
281
+
**We recommend the following materials, to figure out `gunicorn` defaults and configuration:**
0 commit comments