Open Source Management System for Botanic Garden Collections built and maintained by netzkolchose.de in cooperation with the Botanical Garden of the Friedrich Schiller Universität Jena and the Botanical Garden of the TU Braunschweig.
See Features wiki page for a list of features.
To run the System in production mode you'll need:
- Linux or FreeBSD
- Python 3.10
- PostgreSQL and postgis (recommended) (https://docs.djangoproject.com/en/5.2/ref/contrib/gis/install/postgis/)
- sqlite3 and spatialite as alternative (https://docs.djangoproject.com/en/5.2/ref/contrib/gis/install/spatialite/)
- nginx
- latex live
librsvg2-bin(labels use thersvg-convertcommandline tool)
The following environment variables will be used by app/BotGard/settings.py if present.
You can also define an .env or `ini' file to store these value
(See python-decouple documentation)
You can copy the app/.env-example file to app/.env and adjust it to your needs.
POSTGRES_PASSWORD: Password of the postgres user, if specified the postgres database backend will be used. Otherwise it falls back to sqlite3.POSTGRES_USER: Name of the postgres user, defaults topostgresPOSTGRES_DATABASE: Name of the postgres database, defaults topostgresPOSTGRES_HOST: Name of the postgres host, defaults tolocalhostPOSTGRES_PORT: Name of the postgres host port, defaults to5432FULL_SERVER_HOST: Full hostname of the server (e.g. https://your-botgard.com), must be provided for deployments!DJANGO_SECRET_KEY: Overrides theSECRET_KEY, defaults to a fixed sequenceDJANGO_TIME_ZONE: The default timezone, defaults toEurope/BerlinDJANGO_ALLOWED_HOSTS: A list of hosts separated by spaces, defaults to empty listDJANGO_CSRF_TRUSTED_ORIGINS: A list of hosts separated by spaces, defaults toFULL_SERVER_HOSTDJANGO_DEBUG: Set Django debug mode, defaults toTrueMAP_TILE_URL: The URL for using OpenStreetMap raster tiles, defaults to/geo/raster-tiles/{z}/{x}/{y}.png, in live deployment this should be set to an nginx cached proxy url (see https://operations.osmfoundation.org/policies/tiles/)
To initially set up the development environment, install geo libraries and create a virtual environment using tools like venv or virtualenv and then:
sudo apt install librsvg2-bin
# or any other means to install the rsvg package
cd app
pip install -r requirements.txt
./manage.py migrate
./manage.py createsuperuser
./manage.py botgard_update_configAfter that you can just run the development server with:
./manage.py runserverTo create some demo gardens, species and individuals in your database run
./manage.py botgard_demo_dataThe data is taken from CSV files in app/demo-data/.
Postgres is required for proper text search in Django's admin views. If you do not need fulltext search, sqlite will work too.
To create a local database:
sudo apt install postgresql-server-dev-all postgis
# or any other means to install a local postgres server with GIS extension
# start psql
sudo -u postgres psql
# create user and database
CREATE USER "botgard-user" WITH PASSWORD "botgard-password";
CREATE DATABASE "botgard" ENCODING=UTF8 TEMPLATE=template0 OWNER="botgard-user";
CREATE EXTENSION IF NOT EXISTS postgis;
# allow the user to create databases (for unit-testing)
ALTER USER "botgard-user" CREATEDB;
# exit psql ^D
# add GIS extension to new "botgard" database
sudo -u postgres psql -c "CREATE EXTENSION IF NOT EXISTS postgis;" botgard
# run once to add postgis to all django-created test databases
sudo -u postgres psql -c "CREATE EXTENSION IF NOT EXISTS postgis;" template1
./manage.py collectstatic # needs to be run once before testing
./manage.py testDockerfile and app/start-server.sh are the entry points.
Please note that .env files are not put into the docker container (ignored by the .dockerignore file).
For CI deployment, please use environment variables or generate an .env file during deployment.
The unittests use the sqlite backend by default.
docker build --tag botgard-dev .
docker run -ti --env BOTGARD_RUN_TESTS=1 botgard-devTo open a shell in the docker image:
docker run -ti --entrypoint /bin/bash botgard-devThe database of BotGard can be exported via:
./manage.py dumpdata -o dump-file.jsonand imported into a newly created database via:
./manage.py migrate
./manage.py botgard_clear_django_tables
./manage.py loaddata dump-file.jsonThe import requires about 10-15 minutes per 100k objects...
See the Wiki Page.
This project is backed by netzkolchose.de UG If you need help implementing or hosting BotGard for your Institution, please contact us: botgard@netzkolchose.de
Thanks to the Botanical Garden Jena especially Stefan Arndt for his ongoing support and input.
See RoadMap wiki page.