DIMAR: An anti-addiction-focused Drug Inventory Management, Administration and Retrospective tool.
Go to file
Mark Veidemanis 6546f73b98
Fully public...
2024-05-18 03:25:10 +01:00
app Upgrade Bulma and begin drug info screen and favourites 2024-05-17 22:47:16 +01:00
core Fully public... 2024-05-18 03:25:10 +01:00
docker Bump Harakiri 2024-03-26 18:37:47 +00:00
mxs Implement boilerplate search widget/page view 2024-03-21 10:07:09 +00:00
.gitignore Add gitignore and pre-commit 2024-03-26 18:42:08 +00:00
.pre-commit-config.yaml Add gitignore and pre-commit 2024-03-26 18:42:08 +00:00
Dockerfile Start from envelope Django template 2023-10-17 21:00:25 +01:00
Makefile Start from envelope Django template 2023-10-17 21:00:25 +01:00
README.md Improve README 2023-10-17 21:04:07 +01:00
docker-compose.prod.yml Nuclear-grade workaround 2024-03-21 18:42:21 +00:00
docker-compose.yml Remove remaining Redis references 2024-03-21 15:01:01 +00:00
manage.py Start from envelope Django template 2023-10-17 21:00:25 +01:00
requirements.txt Upgrade crispy forms and handle dark theme 2024-05-17 23:13:03 +01:00
stack.env.example Start from envelope Django template 2023-10-17 21:00:25 +01:00

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.