Installation¶
Prerequisites¶
You need to have Python 3 installed on your system. You should have pip and virtualenv installed; on Debian/Ubuntu/Mint systems, install them using the command:
sudo apt install python3-pip python3-virtualenv
Step-by-step procedure¶
Before installing InstrumentDB, you should first decide if you just want to use it («User’s install»), or if you are likely going to hack it («Developer’s install»).
If you do not know which option to pick, you are surely going to be a user, so go on with «User’s install».
User’s install¶
To install InstrumentDB, follow these steps:
Create and activate a virtual environment:
virtualenv venv source venv/bin/activate
Download the source code:
git clone https://github.com/ziotom78/instrumentdb.git && cd instrumentdb
Install all the dependencies (you must have a working Internet connection to run this):
pip3 install -r requirements.txt
Create a custom configuration file and customize it. Be sure to put some random password in
SECRET_KEY
:cp .env.example .env && vim .env
Create an empty database:
python3 manage.py migrate
Create a superuser:
python3 manage.py createsuperuser
Be sure to note down the username and password you pick here, because they will be required to log in.
Test that everything works by firing the local webserver with the following command:
python3 manage.py runserver
Connect to http://127.0.0.1:8000/. If you see an empty landing page, it means that InstrumentDB is operative. Congratulations!
Developer’s install¶
If you are reading this section, it means that you are planning to work on InstrumentDB’s source code. First install Poetry, the tool used to manage dependencies in this project.
To install InstrumentDB, follow these steps:
Download the source code:
git clone https://github.com/ziotom78/instrumentdb.git && cd instrumentdb
Install all the dependencies (you must have a working Internet connection to run this):
poetry install
Create a custom configuration file and customize it. Be sure to put some random password in
SECRET_KEY
:cp .env.example .env && vim .env
Create an empty database:
poetry run ./manage.py migrate
Create a superuser:
poetry run ./manage.py createsuperuser
Be sure to note down the username and password you pick here, because they will be required to log in.
Test that everything works by firing the local webserver with the following command:
poetry run ./manage.py runserver
Connect to http://127.0.0.1:8000/. If you see an empty landing page, it means that InstrumentDB is operative. Congratulations!