EC2 Docker Compose connection refused

Are you sure your app is listening on port 80?

Looks like your Dockerfile suggests it would be port 8000.

Since you’re writing your own Dockerfile anyway, I recommend you build yourself with Build from source — Caddy Documentation. That way you don’t depend on some unknown user’s Docker image which may or may not get updated in the future, and might sneakily have some vulnerabilities added if it gets compromised.