Fix docker CMD. Add asgi.py. Fix static root.

This commit is contained in:
Víðir Valberg Guðmundsson 2021-03-01 17:13:15 +01:00
parent ea3039a279
commit fb00df7274
3 changed files with 9 additions and 2 deletions

View file

@ -41,4 +41,4 @@ ARG BUILD
ENV BUILD ${BUILD}
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
View 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()

View file

@ -95,8 +95,8 @@ USE_L10N = True
USE_TZ = True
STATIC_URL = "/static/"
STATICFILES_DIRS = [PROJECT_DIR / "static"]
STATIC_ROOT = BASE_DIR / "static"
SITE_ID = 1