🦗 Mantis Tracker 🦗
🛠️ Technologien
💻 Setup/Installation
Schritt 1: 📁 Klonen Sie das Repository
git clone https://gitlab.com/opendata-apps/mantis.git
cd mantis
Schritt 2: 🌐 Erstellen Sie eine virtuelle Umgebung und aktivieren Sie sie
python -m venv .venv (or another name with . like .mantis)
source .venv/bin/activate # For Windows: .venv\Scripts\activate
Schritt 3: 📦 Installieren Sie die Abhängigkeiten
pip install -r requirements.txt
Schritt 4: 🗄️ Erstellen Sie eine PostgreSQL-Datenbank
psql -U postgres
CREATE DATABASE mantis_tracker;
CREATE USER mantis_user WITH PASSWORD 'mantis';
GRANT ALL PRIVILEGES ON DATABASE mantis_tracker TO mantis_user;
# MacOS only:
GRANT usage, create ON SCHEMA public TO mantis_user;
\q
Schritt 5: 📝 Initialisieren der Almebic-Versionsverwaltung
Es wird der Ordner »Migration« angelegt.
flask db init
Schritt 6: 🔄 Nur, wenn sich die Datenbankstruktur geändert hat.
flask db migrate -m "your comment"
Schritt 7: 🏗️ Erstellen Sie die Datenbanktabellen
flask db upgrade
Schritt 8: ☕ materialized view erstellen
flask create-mview
flask insert-initial-data
Schritt 9: 📈 Importieren Sie die Daten
cd test/demodata
cat README.txt
Schritt 9: 🎨 Starten Sie den CSS-Watcher
Der Einsatz von Tailwind für das CSS erfordet den Einsatz von Node.js.
Die Abhängigkeiten sind in der Datei package.json festgehalten.
# Einmalig
npm install
# oder hinter einem Proxy
npm --proxy <your-proxy> install
npx tailwindcss -i app/static/css/theme.css -o app/static/build/theme.css --watch
Schritt 10: 🚀 Starten Sie den Entwicklungsserver
python run.py
Schritt 11: 🏢 Starten Sie den Produktions-Server
# For Linux
gunicorn run:app -c gunicorn_config.py
# For Windows
waitress-serve run:app
Schritt 12: 🌐 Öffnen Sie http://localhost:5000 in Ihrem Browser.
- ::
# Meldung id error fix SELECT setval(‚[TableName]_id_seq‘, (SELECT MAX(id) FROM [TableName]))
Liste der verwendeten Pakete
Die Liste wurde erzeug mit: pip freeze
alabaster==0.7.13
alembic==1.10.2
appdirs==1.4.4
async-generator==1.10
attrs==23.1.0
Babel==2.12.1
blinker==1.6.2
cattrs==22.2.0
certifi==2023.5.7
charset-normalizer==3.1.0
click==8.1.3
colorama==0.4.6
coverage==7.2.5
dnspython==2.3.0
docutils==0.20
email-validator==2.0.0.post2
esbonio==0.16.1
et-xmlfile==1.1.0
exceptiongroup==1.1.1
Flask==2.2.3
Flask-Migrate==4.0.4
Flask-SQLAlchemy==3.0.3
Flask-Testing==0.8.1
Flask-WTF==1.1.1
greenlet==2.0.2
gunicorn==20.1.0
h11==0.14.0
idna==3.4
imagesize==1.4.1
iniconfig==2.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
lsprotocol==2023.0.0a1
Mako==1.2.4
MarkupSafe==2.1.2
numpy==1.24.3
openpyxl==3.1.2
outcome==1.2.0
packaging==23.1
pandas==2.0.1
Pillow==9.5.0
pluggy==1.0.0
psycopg2-binary==2.9.6
pygls==1.0.2
Pygments==2.15.1
PySocks==1.7.1
pyspellchecker==0.7.2
pytest==7.3.1
pytest-cov==4.0.0
pytest-cover==3.0.0
pytest-coverage==0.0
pytest-flask==1.2.0
python-dateutil==2.8.2
python-dotenv==1.0.0
pytz==2023.3
requests==2.30.0
selenium==4.9.1
six==1.16.0
sniffio==1.3.0
snowballstemmer==2.2.0
sortedcontainers==2.4.0
Sphinx==7.0.1
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
SQLAlchemy==2.0.7
tqdm==4.65.0
trio==0.22.0
trio-websocket==0.10.2
typeguard==3.0.2
typing_extensions==4.5.0
tzdata==2023.3
urllib3==2.0.2
webdriver-manager==3.8.6
Werkzeug==2.2.3
wsproto==1.2.0
WTForms==3.0.1
XlsxWriter==3.1.2