feat: add containerized FastAPI health check
This commit is contained in:
@@ -49,7 +49,41 @@ Each stage should produce a small, working, reviewable commit.
|
||||
|
||||
## Local development
|
||||
|
||||
Local setup instructions will be added with the first application container.
|
||||
The current milestone is a minimal FastAPI application running in a hardened
|
||||
local container. Docker publishes it only on the PC's loopback interface, so it
|
||||
is not exposed to other devices on the LAN.
|
||||
|
||||
Build and start it:
|
||||
|
||||
```bash
|
||||
docker compose up --build -d
|
||||
```
|
||||
|
||||
Check its status and logs:
|
||||
|
||||
```bash
|
||||
docker compose ps
|
||||
docker compose logs --tail=50 web
|
||||
```
|
||||
|
||||
Open <http://127.0.0.1:8000> or request the health endpoint:
|
||||
|
||||
```bash
|
||||
curl --fail http://127.0.0.1:8000/health
|
||||
```
|
||||
|
||||
Run the automated tests in an ephemeral container:
|
||||
|
||||
```bash
|
||||
docker compose run --rm --build test
|
||||
```
|
||||
|
||||
Stop the application:
|
||||
|
||||
```bash
|
||||
docker compose down
|
||||
```
|
||||
|
||||
Runtime data, downloaded media, local environment files, and secrets must not
|
||||
be committed to Git.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user