Improve README

master
Mark Veidemanis 7 months ago
parent f1dd61e228
commit 5169f5033c
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -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.

Loading…
Cancel
Save