Fix the gunicorn command.

This commit is contained in:
Andrea Dell'Amico 2022-04-15 18:50:41 +02:00
parent 1bd9a56468
commit 65bc6f79f1
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,7 @@ We use it to create the users' home directory before trying the mount via autofs
* Python 3.8+
* Flask 2.1
* gunicorn
### Build the environment
@ -16,7 +17,7 @@ python3 -m venv venv
pip install Flask
```
### Run the service
### Test the service
``` shell
source ./venv/bin/activate
@ -24,3 +25,5 @@ export FLASK_APP=dircreate
export FLASK_ENV=development
flask run
```
Use gunincorn when in production

View File

@ -7,7 +7,7 @@ Environment=FLASK_CONFIG=production
Environment=FLASK_APP=dircreate
User=dircreate
WorkingDirectory=/opt/dircreate
ExecStart=/opt/createdir/venv/bin/gunicorn -b localhost:5000 dircreate:app
ExecStart=/opt/createdir/venv/bin/gunicorn -b localhost:5000 "dircreate:create_app()"
Restart=always
[Install]