Python:
CI/CD Pipeline:
SonarCloud:
Note: The AdminLTE 3.0 template has thousands of issues according to SonarCloud. All are due to template issues and issues within JavaScript for UI dependencies. Working on determining a way to solve these issues or frankly just ignore them.
Utilizing Starlette to render the AdminLTE 3.0 template. This is a basic example to be used as the base/skeleton/template for Starlette applciations.
- git clone https://github.com/devsetgo/starlette-dashboard
- create a virtualenv on linux or Windows Subsystem Linux
First Change directory to 'app'
Update .env file with your settings
cp .env_sample .env
Or use docker image
docker run mikeryan56/starlette-dashboard:latest
UVICORN Run Development (pick one):
uvicorn main:app --port 5000 --reload
python3 main.py
./scripts/dev_run.sh
Run Production (pick one):
uvicorn main:app --workers 2 --port 5000
gunicorn -c gunicorn_cfg.py main:app
# Note: gunicorn is the config for the dockerfile
./script/prd_run.sh
Docker
Docker: docker pull mikeryan56/starlette-dashboard:latest (not implemented)
python3 -m pytest
./scripts/tests.sh
not needed if tests run from ./scripts/tests.sh
coverage-badge -o coverage.svg -f
Not needed if ./scripts/tests.sh is run. It will install and update.
- Follow install instructionsL: [https://pre-commit.com/#install](https://pre-commit.com/#install)
- pre-commit install
- pre-commit run -a
- cleanup
-
Create tests
- Minimum of 80% (Goal to maintain - can drop during build cycles)
- Exception Testing
- Mock requests call
-
Better organization
- Use of Endpoints (equivalent to Flask Blueprints) - starlette routes and endpoint (/app/routes)
-
Configuration Scripts
-
Access Controls
- OAuth via GitHub
- Mock GITHub Oath
- Require Authentication on specified routes
- Profile Page to see you repos and other Github data (limited to 100 items)
-
Gunicorn/Uvicorn configuration
-
Logging (using Loguru)
-
Setup CI/CD Pipeline for test and deployment
- SonarCloud
- Github Actions found in .github/workflow/actions
- tests - matrix run of Python 3.6 and 3.7
- CodeCove.io upload
- docker-rc - docker build and push when pull request approved for release-candidate branch (calendar version - rc)
- docker-master - docker build and push when pull request approved for master branch (calender version and latest)
- ensure docker build only happens after pull_request approved and merged into higher branch
- tests - matrix run of Python 3.6 and 3.7
-
Twelve Factor App ready
-
Build a cookiecutter template for
-
Add code comments
-
Websocket example
-
Docker
- Docker Image
- Docker-Compose
- Docker Swarm settings
- Kubernetes Kompose
-
Tutorials/Documentation
- Basic Overview
- Explantion of Functions
- Explantion of Configuration