Collect static files

This commit is contained in:
Daoud Clarke 2023-10-28 16:38:56 +01:00
parent b39264d131
commit 03fd7e8d9d
3 changed files with 6 additions and 2 deletions

View file

@ -50,7 +50,7 @@ COPY --from=builder /venv /venv
COPY --from=front-end /front-end/dist /front-end-build COPY --from=front-end /front-end/dist /front-end-build
ADD nginx.conf.sigil /app ADD nginx.conf.sigil /app
ADD app.json /app # ADD app.json /app
# Set up a volume where the data will live # Set up a volume where the data will live
VOLUME ["/data"] VOLUME ["/data"]

View file

@ -5,7 +5,8 @@ from django.core.management import call_command
def run(): def run():
django.setup() django.setup()
call_command('migrate') call_command("collectstatic", "-c")
call_command("migrate")
uvicorn.run("mwmbl.asgi:application", host="0.0.0.0", port=5000) uvicorn.run("mwmbl.asgi:application", host="0.0.0.0", port=5000)

View file

@ -8,6 +8,9 @@ from mwmbl.settings_common import *
SECRET_KEY = os.environ["DJANGO_SECRET_KEY"] SECRET_KEY = os.environ["DJANGO_SECRET_KEY"]
STATIC_ROOT = "/app/static/"
DATABASES = {'default': dj_database_url.config(default=os.environ["DATABASE_URL"])} DATABASES = {'default': dj_database_url.config(default=os.environ["DATABASE_URL"])}
DEBUG = True # TODO set back to False DEBUG = True # TODO set back to False