Database for tracking search and rescue activities
.idea | ||
init-db | ||
nginx | ||
static | ||
templates | ||
translations | ||
.gitignore | ||
admin.py | ||
app.py | ||
babel.cfg | ||
dashboard.py | ||
docker-compose.yml | ||
Dockerfile-app | ||
Dockerfile-nginx | ||
generate_certs.sh | ||
gpx_tracks.py | ||
login.py | ||
messages.pot | ||
models.py | ||
qodana.yaml | ||
README.md | ||
requirements.txt | ||
sar_call_details.py | ||
sar_calls.py |
SARBase
An attempt to create search and rescue database for logging SAR jobs and activities.
(c) 2019-2023 Vadim Likholetov
How to prepare MySQL database
mysql> CREATE DATABASE sarbaseapp;
mysql> CREATE USER 'sarbaseuser'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON sarbaseapp.* TO 'sarbaseuser'@'localhost';
mysql> SET @@GLOBAL.sql_mode := REPLACE(@@GLOBAL.sql_mode, 'NO_ZERO_DATE', '');
mysql> FLUSH PRIVILEGES;
mysql> EXIT;
How to recompile the new translations
pybabel extract -F babel.cfg -o messages.pot .
pybabel update -i messages.pot -d translations
# Update the .po files with new translations
...
pybabel compile -d translations
How to run the application with docker-compose
docker-compose up --build
Database migration with docker environment
docker-compose exec web flask db migrate
docker-compose exec web flask db upgrade