|Mark Veidemanis af5f44b89a||1 month ago|
|app||1 month ago|
|core||1 month ago|
|docker||1 month ago|
|Dockerfile||1 month ago|
|Makefile||1 month ago|
|README.md||1 month ago|
|docker-compose.yml||1 month ago|
|manage.py||1 month ago|
|requirements.txt||1 month ago|
|stack.env.example||1 month ago|
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
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 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: firstname.lastname@example.org Password: Password (again): Superuser created successfully.
The Docker Compose file is located in
There is a shortcut to run it:
To stop the containers, run