Example Docker image with a simple note taking app
1.3K
A simple note-taking REST API used in Docker labs.
| Method | Path | Description |
|---|---|---|
| GET | /health | Check if the app is running |
| GET | /notes | List all notes |
| POST | /notes | Add a new note |
| DELETE | /notes/<id> | Delete a note by ID |
# Check health
curl http://localhost:5000/health
# Add a note
curl -X POST http://localhost:5000/notes \
-H "Content-Type: application/json" \
-d '{"content": "Hello from Docker!"}'
# List notes
curl http://localhost:5000/notes
# Delete note with id 1
curl -X DELETE http://localhost:5000/notes/1
| Variable | Default | Description |
|---|---|---|
STORAGE_BACKEND | file | file or postgres |
NOTES_FILE | /data/notes.json | Path to notes file (file backend) |
DB_HOST | localhost | PostgreSQL host (postgres backend) |
DB_PORT | 5432 | PostgreSQL port |
DB_NAME | notes | Database name |
DB_USER | notes | Database user |
DB_PASSWORD | notes | Database password |
Content type
Image
Digest
sha256:6d9c9f1b4…
Size
50.5 MB
Last updated
5 months ago
docker pull kpituke/notes-app-example