DOC: INFRA_STRUCTURE.md

INFRA STRUCTURE

Reference document for all infrastructure components, deployment topology, environment management, and operational runbooks. Powered by AWS Lightsail, Docker Compose, Caddy, Terraform IaC, and GitHub Actions CI/CD.

Network & Resource Topology

Public Internet
ipellio.com / api.ipellio.com
AWS Lightsail
Caddy Reverse Proxy
HTTPS (auto TLS) — host-based routing to Docker services
Docker Compose
api-gateway:8000
FastAPI backend
ipellio-com:3000
Next.js SSR frontend
celery-worker
Async task processing
RDS PostgreSQL 16
Primary database
Redis (Docker)
Celery broker + cache
S3
Backups, storage

Tech Stack

AWS Lightsail
Dev ($20/mo) + Prod ($44/mo)
Caddy
Reverse proxy + auto TLS
Docker Compose
Container orchestration
PostgreSQL 16
RDS managed instance
Redis
Docker — Celery + cache
Terraform
Infrastructure as Code
GitHub Actions
CI/CD pipelines
S3
Backups + storage

Environment Map

DEV
develop
ap-southeast-1 (Singapore)
10.0.0.0/16
infra/terraform/environments/dev/
PROD
main
ap-southeast-2 (Sydney)
10.1.0.0/16
infra/terraform/environments/prod/
BOOTSTRAP
ap-southeast-1
infra/terraform/environments/bootstrap/

Dev vs Prod Differences

AspectDevProd
Regionap-southeast-1 (Singapore)ap-southeast-2 (Sydney)
Branchdevelopmain
ECS CapacityFARGATE_SPOTFARGATE
Container InsightsDisabledEnabled
RDS Instancedb.t3.micro (20GB)Production-grade
RDS Multi-AZNoYes
RDS Public AccessYes (debug)No
Backup Retention3 days14 days
CloudTrail2 years7 years
Deploy ApprovalNoneGitHub Environment gate
Payment CheckSkippedEnforced
Domainsdev.ipellio.com / api-dev.ipellio.comipellio.com / api.ipellio.com