Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions infra/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,19 @@ http://<ElasticIp>/login
After the HTTP replica is healthy:

1. Change the Namecheap root `A` record (`@`) to the stack's `ElasticIp` output.
2. Wait until `encodexdrive.com` resolves to the new address.
3. Through SSM, switch Caddy to its production configuration:
2. Change the Namecheap `www` `A` record to the same `ElasticIp` output.
3. Wait until both domains resolve to the new address.
4. Through SSM, switch Caddy to its production configuration:

```bash
sudo ln -sfn /etc/caddy/Caddyfile.production /etc/caddy/Caddyfile
sudo caddy validate --config /etc/caddy/Caddyfile
sudo systemctl reload caddy
```

4. Verify `https://encodexdrive.com/login` and an authenticated database-backed
5. Verify both HTTPS hostnames and an authenticated database-backed
API request.
Comment on lines +88 to 89
5. Keep the old EC2 instance running for a rollback window.
6. Keep the old EC2 instance running for a rollback window.

The old AWS credentials and SSH GitHub secrets should only be removed after the
new deployment and DNS cutover have been stable.
5 changes: 5 additions & 0 deletions infra/aws/encodex-replica.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,11 @@ Resources:
encode zstd gzip
reverse_proxy 127.0.0.1:30180
}

www.${DomainName} {
encode zstd gzip
reverse_proxy 127.0.0.1:30180
}
CADDY_PRODUCTION

chown root:caddy /etc/caddy/Caddyfile.pre-dns /etc/caddy/Caddyfile.production
Expand Down