Simple demo code using docker, docker-compose, flask, python, mongodb, html, css It just creates two docker containers one mongodb and one with web frontend. Upload a DICOM file and see the preview of it in browser.
What is happening behind the scenes
- Flask setup
- Docker containers for development and docker testing environment
- Auto setup of mongodb
- Upload form and post files save them in mongodb (not optimized just for demo and practice)
- Convert DICOM to JPEG capture output and display in browser
- Delete uploaded file file
- Invented some tests to learn and play with the pytest and flask testing environment
- validatate of the uploaded file
- optimize to write the preview to file/mongo
- add cache folders to .gitignore
- add fast.ai and create a classifier for uploaded files
Estimated time to learn and develop: 5:30h
The following command runs the microservices which listen on 0.0.0.0:5000 for frontend web
./demo.py compose up
Open browser and point it towards the new web docker container, usually: http://localhost:5000
./demo.py compose up -d
./demo.py test
pip install -r requirements/development.txt