small setup
parent
20140f6f31
commit
0205038f0d
|
@ -7,3 +7,5 @@ requirements.txt
|
||||||
app/_version.py
|
app/_version.py
|
||||||
app/static/favicon.ico
|
app/static/favicon.ico
|
||||||
docker-compose.yml
|
docker-compose.yml
|
||||||
|
dhparam/
|
||||||
|
nginx-conf/
|
||||||
|
|
|
@ -91,6 +91,7 @@ class _BlockedServer(pydantic.BaseModel):
|
||||||
|
|
||||||
class Config(pydantic.BaseModel):
|
class Config(pydantic.BaseModel):
|
||||||
domain: str
|
domain: str
|
||||||
|
domain_alias: str
|
||||||
username: str
|
username: str
|
||||||
admin_password: bytes
|
admin_password: bytes
|
||||||
name: str
|
name: str
|
||||||
|
@ -165,6 +166,7 @@ def verify_password(pwd: str) -> bool:
|
||||||
|
|
||||||
CONFIG = load_config()
|
CONFIG = load_config()
|
||||||
DOMAIN = CONFIG.domain
|
DOMAIN = CONFIG.domain
|
||||||
|
DOMAIN_ALIAS = CONFIG.domain_alias
|
||||||
_SCHEME = "https" if CONFIG.https else "http"
|
_SCHEME = "https" if CONFIG.https else "http"
|
||||||
ID = f"{_SCHEME}://{DOMAIN}"
|
ID = f"{_SCHEME}://{DOMAIN}"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
COMPOSE="docker compose --ansi never"
|
||||||
|
DOCKER="/usr/bin/docker"
|
||||||
|
|
||||||
|
cd /home/app/microblog/
|
||||||
|
$COMPOSE run certbot renew && $COMPOSE kill -s SIGHUP webserver
|
||||||
|
$DOCKER system prune -af
|
Loading…
Reference in New Issue