Browse Source

configuration sample

close #3
boyska 1 year ago
parent
commit
82fcc75429
3 changed files with 14 additions and 1 deletions
  1. 2 0
      pizzicore/.gitignore
  2. 9 1
      pizzicore/README.md
  3. 3 0
      pizzicore/pizzicore.env.sample

+ 2 - 0
pizzicore/.gitignore

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

+ 9 - 1
pizzicore/README.md

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

+ 3 - 0
pizzicore/pizzicore.env.sample

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