Deploy the PatientPing Site#
Now that you can SSH into the patientping-web server, let’s get the PatientPing application running on it. We’ll install git, clone the app, install its dependencies, and start the web server.
Cost check: No new resources. You’re using the same EC2 instance; cost is unchanged.
Assignment#
Deploy the PatientPing application on the patientping-web instance.
- SSH into your
patientping-webinstance (e.g.ssh patientpingif you configured that in the previous lesson). - Install
giton the instance (the base AMI may not include it). On Amazon Linux, run:
sudo dnf upgrade
sudo dnf install git- Install
uvto be able to run the Python server:
curl -LsSf https://astral.sh/uv/install.sh | sh- Verify that you have both
gitanduvinPATH:
which git
which uv- Clone the GitHub repo of the PatientPing app to the EC2 instance:
cd ~
git clone https://github.com/bootdotdev/patientping-web.git
cd patientping-web
uv sync
uv run patientping.pyYou should see the server start up on port
8080!
- On your local machine, try opening
http://<patientping-web-public-ip>:8080in your browser; it should hang and fail. Why? Because our security group only allows inbound traffic on port22(SSH). There’s no rule permitting traffic on port8080, so the firewall blocks it.
This is the security group doing its job. By default, all inbound traffic is denied unless you explicitly allow it. Right now the only hole in the firewall is port 22 for SSH.
Don’t worry, we’ll fix this soon. In a new terminal, leave the server running in the original session.