structurize
This commit is contained in:
parent
63358f26af
commit
b8e99abd92
2 changed files with 8 additions and 19 deletions
|
|
@ -7,7 +7,14 @@ app = FastAPI()
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read('params.conf', encoding='utf-8')
|
config.read('params.conf', encoding='utf-8')
|
||||||
args = [config["api"]["path"], config["api"]["host"], config["api"]["username"], config["api"]["password"], config.getint("api", "inbaund_id"), config["api"]["inbaund_url"]]
|
args = [
|
||||||
|
config["api"]["path"],
|
||||||
|
config["api"]["host"],
|
||||||
|
config["api"]["username"],
|
||||||
|
config["api"]["password"],
|
||||||
|
config.getint("api", "inbaund_id"),
|
||||||
|
config["api"]["inbaund_url"]
|
||||||
|
]
|
||||||
|
|
||||||
class RegisterBody(BaseModel) :
|
class RegisterBody(BaseModel) :
|
||||||
email : EmailStr
|
email : EmailStr
|
||||||
|
|
|
||||||
18
build.sh
18
build.sh
|
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
mkdir /etc/spectralvpn_api
|
|
||||||
cp API/* /etc/spectralvpn_api/
|
|
||||||
cp configs/config/params.conf
|
|
||||||
python3 -m venv /etc/spectralvpn_api/.venv
|
|
||||||
/etc/spectralvpn_api/.venv/bin/pip -r requirments.txt
|
|
||||||
|
|
||||||
mkdir /var/www/html/spectralvpn.ru
|
|
||||||
cp -r Frontend/* /var/www/html/spectralvpn.ru/
|
|
||||||
|
|
||||||
cp configs/nginx/* /etc/nginx/sites-available/
|
|
||||||
ln -s /etc/nginx/sites-available/spectralvpn.ru.nginx /etc/nginx/sites-enabled/
|
|
||||||
ln -s /etc/nginx/sites-available/spectralvpn.ru_http.nginx /etc/nginx/sites-enabled/
|
|
||||||
ln -s /etc/nginx/sites-available/spectralvpn_api.nginx /etc/nginx/sites-enabled/
|
|
||||||
|
|
||||||
cp configs/systemd/* /etc/systemd/system/
|
|
||||||
systemctl restart nginx.service
|
|
||||||
systemctl enable --now spectralvpn_api.service
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue