From ebe4483e0b7ae69371d527f20b13ebc2a597e005 Mon Sep 17 00:00:00 2001 From: rmanach Date: Mon, 18 Sep 2023 14:38:07 +0200 Subject: [PATCH] collect django static on startup --- Makefile | 9 +++++---- startup.sh | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ebabff4..8cd4d01 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,6 @@ lint: ruff deployment/*.py ruff mumui/*.py -migrations: - python manage.py makemigrations - python manage.py migrate - django: docker build . -t mumui:local @@ -21,6 +17,11 @@ pushpin-local: nginx-local: cd nginx && docker build . -t nginx:local +build: + $(MAKE) pushpin-local + $(MAKE) nginx-local + $(MAKE) django + run: docker compose up diff --git a/startup.sh b/startup.sh index 57be1ca..cc01d89 100755 --- a/startup.sh +++ b/startup.sh @@ -3,6 +3,7 @@ pip install -r requirements.txt python manage.py makemigrations python manage.py migrate +python manage.py collectstatic --no-input DJANGO_SUPERUSER_PASSWORD=admin python manage.py createsuperuser --noinput --username admin --email admin@admin.fr