Skip to content

Commit ffdb05b

Browse files
committed
Load balanced deployment update
1 parent ea4e98a commit ffdb05b

File tree

1 file changed

+8
-29
lines changed

1 file changed

+8
-29
lines changed

README.md

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -110,36 +110,15 @@ We use [Black](https://github.com/psf/black) to format our code. You can install
110110

111111
### Deployment instructions
112112

113-
Deployment is to dokku, a Heroku-like environment. To deploy, simply push to the git remote:
114-
115-
git push dokku
116-
117-
Sensitive or environment-specific configuration variables are set as environment variables using `dokku config:set`, the important ones are:
118-
119-
* SERVER_NAME - Flask uses this as the base hostname and port for the server - Flask Blueprint subdomains base from this. If it can't match the Host header in requests to this, it serves a 404 response.
120-
- `pmg.org.za` in production
121-
- `pmg.test:5000` in development
122-
- Flask seems to use this for generating absolute URLs, except when the `X-Forwarded-Host` header is provided, in which case that hostname is used for absolute URLs.
123-
* SESSION_COOKIE_DOMAIN
124-
- `pmg.org.za` in production
125-
- `pmg.test` in dev
126-
* SQLALCHEMY_DATABASE_URI
127-
* FLASK_ENV=production
128-
* AWS_ACCESS_KEY_ID
129-
* AWS_SECRET_ACCESS_KEY
130-
* SENDGRID_API_KEY
131-
* MAIL_PASSWORD
132-
* SECURITY_PASSWORD_SALT
133-
* RUN_PERIODIC_TASKS=true
134-
* SOUNDCLOUD_APP_KEY_ID
135-
* SOUNDCLOUD_APP_KEY_SECRET
136-
* SOUNDCLOUD_USERNAME
137-
* SOUNDCLOUD_PASSWORD
138-
* SOUNDCLOUD_PERIOD_HOURS=6
139-
* MAX_SOUNDCLOUD_BATCH=10
140-
* S3_BUCKET=pmg-assets
141-
* STATIC_HOST=https://static.pmg.org.za/ or http://pmg-assets.s3-website-eu-west-1.amazonaws.com/
113+
Deployment is to dokku, a Heroku-like environment. PMG now runs on two servers with an AWS Application Load Balancer.
142114

115+
git remote add dokku-prod-2 dokku@pmg-aws2.pmg.org.za:pmg-prod
116+
git remote add dokku-prod-3 dokku@pmg-aws3.pmg.org.za:pmg-prod
117+
118+
To deploy push to one server, wait for it to complete, then push to the other server:
119+
120+
git push dokku-prod-2
121+
git push dokku-prod-3
143122

144123
### Reindexing for Search
145124

0 commit comments

Comments
 (0)