No credit card? Use DEPLOY-AZURE.md first (Azure for Students). Add AWS later for multi-cloud.
This guide gets you a working URL like http://54.x.x.x (or https://stackpilot.yourdomain.com) for your resume.
Time: ~45–60 minutes (first time)
- AWS account (free tier)
- GitHub repo with this code pushed
- Windows: WSL2 + Docker Desktop, or deploy only on EC2
- AWS Console → EC2 → Launch instance
- Settings:
- Name:
stackpilot-prod - AMI: Ubuntu Server 22.04 LTS
- Type:
t2.microort3.micro(free tier) - Key pair: Create → download
.pem - Security group:
- SSH (22) — My IP only
- HTTP (80) — Anywhere
0.0.0.0/0 - HTTPS (443) — Anywhere
0.0.0.0/0
- Name:
- Launch → copy Public IPv4 (e.g.
54.123.45.67)
From your laptop (PowerShell / WSL):
chmod 400 ~/Downloads/stackpilot-key.pem
ssh -i ~/Downloads/stackpilot-key.pem ubuntu@54.123.45.67On the server:
curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/StackPilot/main/scripts/install-ec2.sh | bash
# Or if repo is private, clone first:
git clone https://github.com/YOUR_USERNAME/StackPilot.git
cd StackPilot
bash scripts/install-ec2.shLog out and back in (docker group):
exit
ssh -i ~/Downloads/stackpilot-key.pem ubuntu@54.123.45.67cd ~/StackPilot
cp .env.production.example .env
nano .envSet:
| Variable | Example |
|---|---|
POSTGRES_PASSWORD |
long random string |
SECRET_KEY |
python3 -c "import secrets; print(secrets.token_urlsafe(32))" |
PLATFORM_BASE_URL |
http://54.123.45.67 (your EC2 public IP) |
DATABASE_URL |
same password as POSTGRES |
Save (Ctrl+O, Enter, Ctrl+X).
cd ~/StackPilot
docker compose up -d --build
docker compose psAll services should be running. First build takes 5–10 minutes.
Open in browser: http://54.123.45.67 (your IP)
- Register an account on the dashboard
- Create project:
- Name:
demo-node - Path:
/samples/node-hello
- Name:
- Click Deploy now
- Wait until status = running
- Open Live app link → should show JSON hello message
Resume link: http://YOUR_EC2_IP
Live app example: http://YOUR_EC2_IP/apps/1/
In GitHub → repo → Settings → Secrets:
| Secret | Value |
|---|---|
EC2_HOST |
54.123.45.67 |
EC2_USER |
ubuntu |
EC2_SSH_KEY |
entire .pem file contents |
Push to main → Actions runs deploy.yml → updates server.
Full steps (Let's Encrypt + Docker Nginx): docs/HTTPS.md
Quick outline: open Azure port 443 → certbot certonly --standalone → enable nginx/conf.d/ssl-stackpilot.conf → set PLATFORM_BASE_URL=https://your-domain
| Problem | Fix |
|---|---|
| Can't open site | Check security group allows port 80 |
Deploy stays building |
docker compose logs -f api |
| App URL 503 | Wait 30s; check docker ps for student container |
| API DB error | Check .env DATABASE_URL matches postgres password |
docker compose logs -f api
docker compose restart api
docker psDeployed StackPilot (FastAPI, React, PostgreSQL, Docker, Nginx) on AWS EC2 with GitHub Actions CI/CD — a self-hosted PaaS that builds and runs containerized student apps with public URLs at http://YOUR_IP.