Fix docker CMD. Add asgi.py. Fix static root.
This commit is contained in:
parent
ea3039a279
commit
fb00df7274
|
@ -41,4 +41,4 @@ ARG BUILD
|
||||||
ENV BUILD ${BUILD}
|
ENV BUILD ${BUILD}
|
||||||
|
|
||||||
ENTRYPOINT ["./entrypoint.sh"]
|
ENTRYPOINT ["./entrypoint.sh"]
|
||||||
CMD ["uvicorn", "config.asgi:application", "--host", "0.0.0.0", "--port", "8000", "--workers", "3", "--lifespan", "off"]
|
CMD ["uvicorn", "project.asgi:application", "--host", "0.0.0.0", "--port", "8000", "--workers", "3", "--lifespan", "off"]
|
||||||
|
|
7
src/project/asgi.py
Normal file
7
src/project/asgi.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import os
|
||||||
|
|
||||||
|
from django.core.asgi import get_asgi_application
|
||||||
|
|
||||||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
|
||||||
|
|
||||||
|
application = get_asgi_application()
|
|
@ -95,8 +95,8 @@ USE_L10N = True
|
||||||
USE_TZ = True
|
USE_TZ = True
|
||||||
|
|
||||||
STATIC_URL = "/static/"
|
STATIC_URL = "/static/"
|
||||||
|
|
||||||
STATICFILES_DIRS = [PROJECT_DIR / "static"]
|
STATICFILES_DIRS = [PROJECT_DIR / "static"]
|
||||||
|
STATIC_ROOT = BASE_DIR / "static"
|
||||||
|
|
||||||
SITE_ID = 1
|
SITE_ID = 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue