/instrumentdb

Web application for managing metadata and persistent identifiers of scientific instruments

Primary LanguagePythonMIT LicenseMIT

InstrumentDB

Web application for managing metadata about scientific instruments and creating persistent identifiers (PIDs) for them according to PIDINST.

Development

Start services:

docker compose up

Initialize database:

docker compose exec django ./manage.py migrate
docker compose exec django ./manage.py loaddata instruments/fixtures/initial.json
docker compose exec django ./manage.py createsuperuser

Navigate to http://localhost:8000.

Install pre-commit hooks:

pre-commit install

To make migrations, run tests, etc., use prefix:

docker compose exec django ./manage.py

Release version:

pip install -r requirements_dev.txt
release-version patch

Production

InstrumentDB is configured using the following environment variables:

  • MODE: must have value production
  • PID_SERVICE_URL: URL to an instance of PID service
  • DATABASE_HOST: PostgreSQL host
  • DATABASE_PORT: PostgreSQL port
  • DATABASE_NAME: PostgreSQL database name
  • DATABASE_USER: PostgreSQL user
  • DATABASE_PASSWORD: PostgreSQL password
  • SECRET_KEY: secret key for cryptographic signing
  • PUBLIC_URL: public URL of the application

License

MIT