Fix the gunicorn command.
This commit is contained in:
parent
1bd9a56468
commit
65bc6f79f1
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue