diff --git a/README.md b/README.md index ce2a3f0..bbe6e13 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/createdir.service b/createdir.service index cc73507..df5aaff 100644 --- a/createdir.service +++ b/createdir.service @@ -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]