Sign inSign up

kpituke/notes-app-example

By kpituke

•Updated 5 months ago

Example Docker image with a simple note taking app

Image
0

1.3K

kpituke/notes-app-example repository overview

⁠Notes App

A simple note-taking REST API used in Docker labs.

⁠Endpoints

MethodPathDescription
GET/healthCheck if the app is running
GET/notesList all notes
POST/notesAdd a new note
DELETE/notes/<id>Delete a note by ID

⁠Example curl commands

# 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

⁠Environment variables

VariableDefaultDescription
STORAGE_BACKENDfilefile or postgres
NOTES_FILE/data/notes.jsonPath to notes file (file backend)
DB_HOSTlocalhostPostgreSQL host (postgres backend)
DB_PORT5432PostgreSQL port
DB_NAMEnotesDatabase name
DB_USERnotesDatabase user
DB_PASSWORDnotesDatabase password

Tag summary

Content type

Image

Digest

sha256:6d9c9f1b4…

Size

50.5 MB

Last updated

5 months ago

docker pull kpituke/notes-app-example