πŸ“˜ Deploy Playbook

TrueBalance Γ— TrueCredits Hackathon Β· June 11–12, 2026 Β· all teams

Your team has one EC2 (hackathon-NN) and one public domain (https://<team-slug>.hackathon.afinit.dev, TLS included).

Run anything that listens on port 8080 of your EC2 β€” it is live on your domain immediately. No load balancer config, no DNS, no tickets. Until then your domain shows your team's "warming up" page; the moment something answers on :8080 it becomes your app.

1 Β· Your kit

EC2hackathon-NN (NN = your team number). Verify which box is yours: https://<slug>.hackathon.afinit.dev/__hk
Domainhttps://<team-slug>.hackathon.afinit.dev β†’ your EC2 port 8080. Find yours & watch it live: hackathon.afinit.dev/preview
Spec4 vCPU / 15 GB RAM / 50 GB disk Β· Amazon Linux 2023 Β· docker + compose + git preinstalled
SSHssh -i hackathon2026.pem ec2-user@<public-ip> β€” pem + IP list via Slack / your team room Β· #temp_hackathon_infra β†’ EC2 inventory thread

2 Β· Deploy β€” pick any recipe

A. Docker (recommended)

docker run -d --name app --restart unless-stopped -p 8080:8080 <your-image>
# app on another internal port? map it: -p 8080:3000 (Node), -p 8080:80 (nginx frontend)

B. docker compose β€” only ONE service publishes 8080 (the front door); internal services talk container-to-container, no ports: needed

services:
  web: { build: ., ports: ["8080:3000"], restart: unless-stopped }
  api: { build: ./api, restart: unless-stopped }   # reach as http://api:<port>

C. Bare process

nohup python3 -m uvicorn main:app --host 0.0.0.0 --port 8080 > app.log 2>&1 &
# node/java: sudo dnf install -y nodejs / java-21-amazon-corretto

Getting code onto the box: github.com, Docker Hub, npm, pip, Maven all work. ⚠️ GHE (github.balancehero.cc) is NOT reachable from these hosts β€” scp your code from your laptop, or mirror to github.com.

3 Β· Verify (60 seconds)

curl -s localhost:8080/     # 1. app answers locally
curl -s localhost/          # 2. through the on-host ingress
curl -s localhost/__hk      # 3. confirms which team box you are on

If (1) works, https://<slug>.hackathon.afinit.dev works.

4 Β· Rules of the road

5 Β· Slack login for your domain (optional, self-service)

Your domain is public by default. Want it gated behind company Slack? Flip it yourself at hackathon.afinit.dev/authctl β€” everyone in the workspace (participants, judges, ops) can still get in after signing in.

6 Β· What you can (and can't) reach from your box

Verified from all 30 boxes β€” where a login exists, the network is open but you still sign in with your own account.

βœ… ReachableAddressNote
Kibana β€” stage app logsstage-applog-kibana.balancehero.cclogin required
Kibana β€” prod app logsprod-applog-kibana.balancehero.cctemporary routeΒΉ Β· prod β€” look, don't touch
JupyterHubjupyterhub.balancehero.cctemporary routeΒΉ Β· login required
Nexus (private Java deps)nexus.truebalance.cc:443for building TB/TC backend services
stage infra servicesmemcached Β· egress-proxy etc.VPC direct β€” for stage-stack replicas
mock-api-proxyendpoint in your team roomPayU Β· Razorpay Β· CIBIL Β· Experian mocks
public internet (egress)β€”unrestricted β€” npm, pip, Docker Hub, github.com
❌ Not reachable (by design)Why
GHE (github.balancehero.cc)IP allowlist β€” use github.com or scp (Β§2)
prod services / prod DB endpointsPolicy: stage only, no prod data (prod Kibana is the single read-only exception)

ΒΉ Temporary route set up for the event β€” if these stop responding, don't debug it, ping #temp_hackathon_infra (your domain, DB and stage Kibana are unaffected).
Stage DBs: directly reachable today, but use your team-private MySQL or the temporary hackathon RDS (Β§4) β€” direct access to the real stage DBs is being cut intentionally; if a direct DB connection stops working, switch to your team DB / the hackathon RDS endpoint, don't file a bug.

7 Β· Logs & troubleshooting

Your logs β€” nearest first: β‘  docker logs -f app on the box. β‘‘ Central log search: everything your containers print to stdout/stderr is collected automatically (nothing to set up) β€” open stage Kibana, sign in with your own account β†’ Discover β†’ data view "Hackathon team logs" β†’ filter team: <your-slug>. β‘’ Bare process? Log to ~/app.log (recipe C already does) β€” collected too. JSON lines become searchable fields; bursts over ~200 lines/s per container are dropped from central search only (docker logs keeps everything).

SymptomFix
Domain still shows "warming up" pageNothing on 8080: curl localhost:8080, docker ps, docker logs app
localhost:8080 works, domain doesn'tWrong box β€” curl localhost/__hk must show your slug
App was live, team page is backApp crashed (the page is the automatic fallback) β€” docker logs app
"port already in use" on 8080Your own old process holds it: ss -tlnp | grep 8080. Port 80 busy is normal (ingress β€” leave it)
Long request dies ~60 sProxy timeout β€” stream, poll, or use WebSocket
Can't clone from GHEExpected (blocked) β€” use github.com or scp

Still stuck β†’ Slack #temp_hackathon_infra (Neal Β· David Β· Dharmendra) Β· floor support: Sagar +1.