mirror of
https://gitea.publichub.eu/oscar.krause/fastapi-dls.git
synced 2024-11-12 17:38:48 +00:00
updated sudo / su commands (list sudo fist instead of su)
This commit is contained in:
parent
c9c73f6cf2
commit
d1a77df0e1
@ -145,9 +145,9 @@ This is only to test whether the service starts successfully.
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd /opt/fastapi-dls/app
|
cd /opt/fastapi-dls/app
|
||||||
su - www-data -c "/opt/fastapi-dls/venv/bin/uvicorn main:app --app-dir=/opt/fastapi-dls/app"
|
sudo -u www-data /opt/fastapi-dls/venv/bin/uvicorn main:app --app-dir=/opt/fastapi-dls/app
|
||||||
# or
|
# or
|
||||||
sudo -u www-data -c "/opt/fastapi-dls/venv/bin/uvicorn main:app --app-dir=/opt/fastapi-dls/app"
|
su - www-data -c "/opt/fastapi-dls/venv/bin/uvicorn main:app --app-dir=/opt/fastapi-dls/app"
|
||||||
```
|
```
|
||||||
|
|
||||||
**Create config file**
|
**Create config file**
|
||||||
@ -247,6 +247,8 @@ This is only to test whether the service starts successfully.
|
|||||||
BASE_DIR=/opt/fastapi-dls
|
BASE_DIR=/opt/fastapi-dls
|
||||||
SERVICE_USER=dls
|
SERVICE_USER=dls
|
||||||
cd ${BASE_DIR}
|
cd ${BASE_DIR}
|
||||||
|
sudo -u ${SERVICE_USER} ${BASE_DIR}/venv/bin/uvicorn main:app --app-dir=${BASE_DIR}/app
|
||||||
|
# or
|
||||||
su - ${SERVICE_USER} -c "${BASE_DIR}/venv/bin/uvicorn main:app --app-dir=${BASE_DIR}/app"
|
su - ${SERVICE_USER} -c "${BASE_DIR}/venv/bin/uvicorn main:app --app-dir=${BASE_DIR}/app"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user