This commit is contained in:
Oscar Krause 2022-12-28 06:56:31 +01:00
parent 0b46212f28
commit 2af4b456b6

View File

@ -10,8 +10,8 @@ After=network.target
User=www-data User=www-data
Group=www-data Group=www-data
AmbientCapabilities=CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_BIND_SERVICE
EnvironmentFile=/etc/fastapi-dls/env
WorkingDirectory=/usr/share/fastapi-dls WorkingDirectory=/usr/share/fastapi-dls
EnvironmentFile=/etc/fastapi-dls/env
ExecStart=uvicorn main:app \\ ExecStart=uvicorn main:app \\
--env-file /etc/fastapi-dls/env \\ --env-file /etc/fastapi-dls/env \\
--host \$DLS_URL --port \$DLS_PORT \\ --host \$DLS_URL --port \$DLS_PORT \\
@ -36,8 +36,8 @@ echo "> Create config directory ..."
mkdir -p $CONFIG_DIR mkdir -p $CONFIG_DIR
echo "> Writing default config parameters ..." echo "> Writing default config parameters ..."
touch $CONFIG_DIR/fastapi-dls.env touch $CONFIG_DIR/fastapi-dls/env
cat <<EOF > $CONFIG_DIR/fastapi-dls.env cat <<EOF > $CONFIG_DIR/fastapi-dls/env
DLS_URL=127.0.0.1 DLS_URL=127.0.0.1
DLS_PORT=443 DLS_PORT=443
LEASE_EXPIRE_DAYS=90 LEASE_EXPIRE_DAYS=90