configuration sample

close #3
This commit is contained in:
boyska 2022-08-17 19:23:49 +02:00
parent cebc87cd38
commit 82fcc75429
3 changed files with 14 additions and 1 deletions

2
pizzicore/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
pizzicore.env
.*.sw[po]

View file

@ -37,11 +37,19 @@ docker-compose up
## Debian Bullseye
Just install a few packages from the standard repositories, and you're set. No pip, virtualenv, …
```
apt install python3-fastapi python3-dotenv uvicorn
uvicorn pizzicore:app --reload --port 8000 --host 0.0.0.0
env QUEUES_NUMBER=2 uvicorn pizzicore:app --reload --port 8000 --host 0.0.0.0
```
In the snippet above, you can see how to set variables on the commandline. See `pizzicore.env.sample` for a list of settings.
You can also create a `pizzicore.env` file (named exactly like that) as a configuration method.
Environment variables take precedence over configuration files.
## TODO
* configurazione

View file

@ -0,0 +1,3 @@
STORAGE_DIR="/home/puz/my/hackmeeting/numeretti/pizzicore/storage/"
APP_NAME="Numeretti hackmeeting"
QUEUES_NUMBER=2