Autopsy is free, Flask-based Postmortem web app.
Autopsy spreads postmortems culture, involves people to learn on the failures.
A small demo running on raspberry pi in k8s cluster:
http://autopsy.ep4sh.ru
- Users can add, update postmortems
- You can update only your postmortem
- User with id == 1 is a service's admininstrator
- Dashboard shows latest and random postmortems
- Postmortems provides lists postmortems with CRU(D) capabilities
- Search performs search operation in Postmortems' names
- Admin manages all the service's data in Flask-admin way
- Users can register, login, update the profile, create support tickets (attaching screenshot), logout and restore their password via email.
- python3
- PostgreSQL
- SMTP server (for password reset)
git clone https://github.com/ep4sh/autopsy.git
cd autopsy
I'd recommend to use python virtual environment to install all dependencies:
python3 -m venv path/to/new/virtual/environment
source path/to/new/virtual/environment
Autopsy reads the key-value pairs from .env
files and adds them to environment variable
cp .env.example .env
Variable | Value(default) | Required for update | Description |
---|---|---|---|
FLASK_APP | main.py | No | Name of the main module |
FLASK_ENV | development | depends | Flask mode |
FLASK_SECRET | abcdef | Yes | Flask Secret |
MAIL_SERVER | smtp.example.com | Yes | SMTP server URL |
MAIL_PORT | 465 | Yes | SMTP server port |
MAIL_USE_SSL | True | depends | SMTP server SSL |
MAIL_USERNAME | noreply@example.com | Yes | Username for no-reply@ account |
MAIL_PASSWORD | <account_password> | Yes | Password for no-reply account |
DATABASE_HOST | <database_host> | Yes | Database host |
DATABASE_USER | docker | Yes | Database Username |
DATABASE_PASSWORD | docker | Yes | Database Password |
DATABASE_PORT | 5432 | depends | Database Port |
DATABASE_NAME | docker | Yes | Database Name |
SQLALCHEMY_TRACK_MODIFICATIONS | True | No | Track DB modification |
pip3 install -r requirements.txt
It will create database schema and load init resources like roles
flask shell <<< "from autopsy_app.model import db; db.create_all();"
OR
flask db stamp head
flask db migrate
flask db upgrade
uswgi app.ini
http://localhost:5000/
There is a way to spin-up development PostgreSQL database in container via docker-compose.
DB credentials are via environment vars - please checl docker-compose.yml
file.
cd docker_misc/db
sudo chmod 777 pgdata
docker-compose up -d
pylint --load-plugins pylint_flask,pylint_flask_sqlalchemy *.py
I'm in love with books. If you want to thank me, just help me to buy books from the list