From 5169f5033cc51b8b6ae65b98392c7ccca752e550 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Tue, 17 Oct 2023 21:04:07 +0100 Subject: [PATCH] Improve README --- README.md | 32 +++++--------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 9cd4b09..b371fea 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,13 @@ -# Envelope -Template Django app. +# 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. ```shell $ python3 -m venv env $ source env/bin/activate -(env) $ pip install -r docker/prod/requirements.prod.txt -``` - -## Local settings -You'll need to copy the `app/local_settings.example.py` file to `app/local_settings.py`. The project won't start otherwise. -``` -$ cp app/local_settings.example.py app/local_settings.py +(env) $ pip install -r requirements.txt ``` ## stack.env @@ -39,26 +34,9 @@ Superuser created successfully. ``` ## Running -The Docker Compose file is located in `docker/docker-compose.prod.yml`. +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`. -## Setup -This setup may be different from what you've seen before. - -### Uvicorn -There is a Uvicorn worker in the `app` container listening on `/var/run/socks/app.sock`. This is the bit that runs the actual code. - -### Nginx -Nginx runs in the `nginx` container and proxies requests to Uvicorn thanks to a mounted and shared directory. No TCP required. - -### Pre-start steps -There's a few commands running before start to ensure Django works correctly. - -#### Migration -The `migration` container step runs the migrations so you don't need to remember to do it. - -#### Collectstatic -The `collectstatic` container step collects all static files from plugins and puts them in the `core/static` folder. This folder is served straight from Nginx without going through Uvicorn.