forked from GeriLife/caregiving
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,33 +2,30 @@ | |
|
||
This section is a work-in-progress and outlines issues that arise during or relate to deployment. The main assumption is that we are deploying to [Dokku PaaS](https://dokku.com). | ||
|
||
## Configure initial app and database | ||
## Configure initial app and domain | ||
|
||
Configure the initial Dokku app and database with the following commands. | ||
|
||
- create app `dokku apps:create caregiving-app` | ||
- configure app domain `sudo dokku domains:add caregiving-app <example.com>` | ||
- set `DJANGO_ALLOWED_HOSTS` to include app domain `dokku config:set caregiving-app DJANGO_ALLOWED_HOSTS=<example.com>` | ||
- set `DJANGO_CSRF_TRUSTED_ORIGINS` to include app domain with scheme (e.g., https://) `dokku config:set caregiving-app DJANGO_CSRF_TRUSTED_ORIGINS=<https://example.com>` | ||
- install Postgres plugin `dokku plugin:install https://github.com/dokku/dokku-postgres.git` | ||
- create Postgres DB `dokku postgres:create caregiving-db` | ||
- link DB to app `dokku postgres:link caregiving-db caregiving-app` | ||
|
||
## Set up SSL | ||
|
||
Enable HTTPS support with the following commands on the Dokku server. | ||
|
||
- install Let's Encrypt `dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git` | ||
- configure Let's Encrypt email `sudo dokku config:set --no-restart --global DOKKU_LETSENCRYPT_EMAIL=<[email protected]>` | ||
- enable Let's Encrypt for app `sudo dokku letsencrypt:enable caregiving-app` | ||
- auto-update Let's Encrypt certificate `sudo dokku letsencrypt:cron-job --add` | ||
|
||
## Configure app proxy ports | ||
- configure Let's Encrypt email `dokku config:set --no-restart --global DOKKU_LETSENCRYPT_EMAIL=<[email protected]>` | ||
- enable Let's Encrypt for app `dokku letsencrypt:enable caregiving-app` | ||
- auto-update Let's Encrypt certificate `dokku letsencrypt:cron-job --add`' | ||
- `dokku letsencrypt:auto-renew caregiving-app` | ||
|
||
We need to configure port 443 to forward to the Django default port 8000 with the following commands. | ||
## Set up database | ||
|
||
- clear default proxy ports `dokku proxy:ports-clear caregiving-app` | ||
- configure correct app proxy port `dokku proxy:ports-add caregiving-app https:443:8000` | ||
- install Postgres plugin `dokku plugin:install https://github.com/dokku/dokku-postgres.git` | ||
- create Postgres DB `dokku postgres:create caregiving-db` | ||
- link DB to app `dokku postgres:link caregiving-db caregiving-app` | ||
|
||
## Push code from local computer | ||
|
||
|