DIMAR: An anti-addiction-focused Drug Inventory Management, Administration and Retrospective tool.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Mark Veidemanis 6546f73b98
Fully public...
1 month ago
app Upgrade Bulma and begin drug info screen and favourites 1 month ago
core Fully public... 1 month ago
docker Bump Harakiri 3 months ago
mxs Implement boilerplate search widget/page view 3 months ago
.gitignore Add gitignore and pre-commit 3 months ago
.pre-commit-config.yaml Add gitignore and pre-commit 3 months ago
Dockerfile Start from envelope Django template 8 months ago
Makefile Start from envelope Django template 8 months ago
README.md Improve README 8 months ago
docker-compose.prod.yml Nuclear-grade workaround 3 months ago
docker-compose.yml Remove remaining Redis references 3 months ago
manage.py Start from envelope Django template 8 months ago
requirements.txt Upgrade crispy forms and handle dark theme 1 month ago
stack.env.example Start from envelope Django template 8 months ago

README.md

drugs

DIMAR: An anti-addiction-focused Drug Inventory Management, Administration and Retrospective tool.

Setting up the environment

Create the virtual environment, enable it, and install the dependencies.

$ python3 -m venv env
$ source env/bin/activate
(env) $ pip install -r requirements.txt

stack.env

The stack.env file referenced is a Portainer special. This is where Portainer would put a file containing all the environment variables set up in its UI. To run it manually, you will need to copy stack.env.example to stack.env in the project root.

Running database migrations

Now we need to run the database migrations in order to get a working database.

(env) $ python manage.py migrate

Note that these are automatically run by a step in the compose file in production. You won't need to do that manually.

Creating a superuser

In order to access Django admin, we need a superuser.

(env) $ python manage.py createsuperuser
Username: t2
Email address: t2@google.com
Password: 
Password (again): 
Superuser created successfully.

Running

The Docker Compose file is located in docker-compose.yml. There is a shortcut to run it: make run.

Stopping

To stop the containers, run make stop.