This repo configures infrastructure for the https://dap.ps/ service.
The service is split into two stages:
Stage | With CDN | Without CDN |
---|---|---|
prod |
https://prod.dap.ps/ | https://raw.prod.dap.ps/ |
dev |
https://dev.dap.ps/ | https://raw.dev.dap.ps/ |
The prod
environment is CNAME
ed to dap.ps
domain.
The infrastructure is hosted on AWS and consists of 5 main elements:
All the AWS parts are provisioned and managed with Terraform and the MongoDB cluster configured with Ansible.
The dap.ps
domain is registered via Gandi DNS provider and is managed with AWS Route53 Hosted Zone by changing the Name Servers with help from Gandi support. See dns.tf
for more details.
There are no mailboxes for dap.ps
domain. We forward emails using AWS Lambda and AWS SES. You can change the forwarding rules by editing the defaultConfig
object in files/sesforwarder.js
and adding Verified Emails in mail.tf
.
Creation of both dev
and prod
stages is as simple as:
terraform init
terraform apply
And then configure the MongoDB hosts using ansible:
ansible-playbook ansible/dev.yml
ansible-playbook ansible/prod.yml
These helped me during work on this setup: