Ansible docs addendum for live deployment

This commit is contained in:
RentFreeMedia 2022-04-06 17:08:14 -05:00
parent aded2e2e44
commit 98849617da
3 changed files with 43 additions and 31 deletions

41
docs/deploy_live.md Normal file
View File

@ -0,0 +1,41 @@
# Deploy Live
If you've made it this far you're ready to deploy your site live to the world and start building your audience.
We provide Ansible scripts for deployment of all of the code in this project to Digital Ocean, who make the most sense in terms of bandwidth pricing and features to host this. Among the cloud services Digital Ocean has:
1. $0.01 per gigabyte outgoing bandwidth pricing, which is roughly 1/8 to 1/10 the price of Azure, AWS, and Google Cloud by comparison
2. An S3-compatible storage service with CDN that "just works" with our included storage backend for images, static files, and media files.
3. A well mantained API to automate the deployment process which is rather complex to handle manually.
## Installing Dependencies
To run the provided deployment scripts, you need a few optional dependencies.
To install them, run:
`ansible-galaxy collection install amazon.aws community.crypto community.digitalocean community.general `
## Running
Next, execute the following to start the deployment:
`ansible-playbook ./main.yml -i "mydomain.com",` where mydomain.com is your root domain name.
You'll need to be logged into your Digital Ocean dashboard when you start the script, as it will ask you for things like API keys, S3 access keys, etc. You'll also need your email server authentication information and SMTP server information if you are not using a common email service like gmail or yahoo or similar.
The scripts will set up a complete installation of Rent Free Media on Digital Ocean in its own project namespace, including DNS records.
Note that for SSL key issuance to work, you'll need to have pointed your domain name's DNS servers to Digital Ocean beforehand.
## Post Setup
When the script has finished and you confirm that your site is alive, you're not quite done yet. You will surely need to set up your mail server information in your DNS records according to your mail service's instructions, so be sure to do that lest your user notification emails wind up in the spam folders of your users.
You'll also need to verify via your Stripe dashboard that webhook events are being sent successfully to your web server.
If it doesn't all work right away, give it an hour or so and try again, as it may take a while for DNS changes to spread out.
When your site responds to its domain name, and you can successfully log into your CMS admin section, and the Stripe webhook events are being successfully sent, you're in business. All you have left to do is build your site and publish your content.
Enjoy!

View File

@ -14,4 +14,5 @@ nav:
- Comments: manage_comments.md
- HTML Templates: customizing_templates.md
- Site Settings: site_settings.md
- Django Core Admin: django_admin.md
- Django Core Admin: django_admin.md
- Deployment: deploy_live.md

View File

@ -1,30 +0,0 @@
--no-binary=wagtail-2fa
bleach==3.3.1
beautifulsoup4>=4.8,<4.10
python-dotenv>=0.19.2
Django>=3.2.12,<3.3
phonenumberslite>=8.12.30
django-allauth>=0.48.0
django-allauth-2fa>=0.8
django-anymail>=8.4
django-bootstrap5>=21
django-phonenumber-field[phonenumberslite]>=5.2
django-storages>=1.11.1
django-comments-dab>=2.7.1,<2.7.2
dj-stripe>=2.6.1
git+git://github.com/rentfreemedia/django-betterforms@changes
git+git://github.com/rentfreemedia/django-post_office.git@changes
git+git://github.com/rentfreemedia/wagtail-cache.git@changes
git+git://github.com/rentfreemedia/python-video-ids.git@changes
git+git://github.com/rentfreemedia/django-summernote.git@changes
git+git://github.com/rentfreemedia/django-drip-campaigns.git@changes
git+git://github.com/rentfreemedia/wagtail-personalisation.git@changes
git+git://github.com/rentfreemedia/django-dbtemplates.git@changes
git+git://github.com/rentfreemedia/markdown.git@changes
pytube>=11.0.1
unidecode>=1.3.2
wagtail>=2.15,<2.16
wagtail-2fa>=1.5.0
wagtailmedia>=0.8.0
wagtail-markdown>=0.7.0
gunicorn>=20.1.0