Skip to content

Commit 24f8cd2

Browse files
committed
Update uvicorn port
1 parent 8fe3f8c commit 24f8cd2

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Every push to `main` now syncs the repository to an EC2 instance and restarts a
7272

7373
### 1. Prepare the EC2 host (one-time)
7474

75-
1. Launch an EC2 instance (Ubuntu 22.04+ or Amazon Linux 2023) with inbound access to TCP 8000 (or front it with an ALB/NGINX if you prefer port 80/443).
75+
1. Launch an EC2 instance (Ubuntu 22.04+ or Amazon Linux 2023) with inbound access to TCP 80 (or front it with an ALB/NGINX if you prefer TLS on 443).
7676
2. Install system packages:
7777

7878
```bash
@@ -111,10 +111,10 @@ Populate these secrets so `.github/workflows/deploy.yml` can transfer the code a
111111
- Copies the code into `/opt/nasa-skyview/app`.
112112
- Creates/updates a Python virtual environment in `/opt/nasa-skyview/venv`.
113113
- Installs Python dependencies with `pip`.
114-
- Generates a fresh `/etc/systemd/system/nasa-skyview.service` tailored to the install paths.
115-
- Restarts the `nasa-skyview` service (serving on port 8000 by default).
114+
- Generates a fresh `/etc/systemd/system/nasa-skyview.service` tailored to the install paths (listening on port 80).
115+
- Restarts the `nasa-skyview` service.
116116

117-
Logs are written to `/var/log/nasa-skyview.log` and `/var/log/nasa-skyview.err`, and cached SkyView tiles persist in `/opt/nasa-skyview/outputs`.
117+
Logs are written to `/var/log/nasa-skyview.log` and `/var/log/nasa-skyview.err`, and cached SkyView tiles persist in `/opt/nasa-skyview/outputs`. Verify your security group allows inbound HTTP on port 80.
118118

119119
To roll back, re-run the workflow on an earlier commit or SSH into the instance, check out the desired commit manually inside `/opt/nasa-skyview/app`, reinstall requirements, and restart the service (`sudo systemctl restart nasa-skyview`).
120120

deploy/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Wants=network-online.target
5252
Type=simple
5353
WorkingDirectory=$APP_DIR
5454
Environment=PYTHONUNBUFFERED=1
55-
Environment=UVICORN_PORT=8000
55+
Environment=UVICORN_PORT=80
5656
ExecStartPre=/usr/bin/mkdir -p $OUTPUT_DIR
5757
ExecStart=$VENV_DIR/bin/uvicorn src.server:app --host 0.0.0.0 --port \${UVICORN_PORT}
5858
Restart=on-failure

0 commit comments

Comments
 (0)