fix env file usage

This commit is contained in:
2026-04-09 15:30:47 +03:00
parent 606dc930e8
commit 4854d97105
3 changed files with 5 additions and 2 deletions

View File

@@ -3,3 +3,4 @@
/files
/subdomain_files
/logs
/.env

View File

@@ -7,7 +7,7 @@ from sanic.exceptions import NotFound, MethodNotAllowed
from sanic_cors import CORS
from sanic_ext import Extend
from conf import STATIC_DIR
from conf import STATIC_DIR, BASE_HOSTS
from utils import get_j2env, get_sort_icon, get_sort_link, resolve_path, list_dir
@@ -17,7 +17,6 @@ app = Sanic('autoindex', strict_slashes=True)
Extend(app)
cors = CORS(app)
app.static('/~static/', STATIC_DIR, use_content_range=True, stream_large_files=True)
print(STATIC_DIR)
j2env = get_j2env(DEBUG)
@@ -63,6 +62,7 @@ async def index(request: Request, path=''):
if __name__ == '__main__':
print(f'{BASE_HOSTS=}')
if DEBUG:
app.run(host='0.0.0.0', port=8000, debug=True, auto_reload=True)
else:

View File

@@ -6,6 +6,8 @@ services:
- "./subdomain_files:/src/subdomain_files"
ports:
- "8000:8000"
env_file:
- .env
develop:
watch:
- action: sync+restart