From c9400e8f9e70220c826fcc53f421c7f7e5dd6347 Mon Sep 17 00:00:00 2001 From: Iurii Tatishchev Date: Thu, 8 Apr 2021 22:34:20 -0700 Subject: [PATCH] start.sh use daphne. Ignore extra files --- .dockerignore | 1 + .gitignore | 1 + start.sh | 7 ++----- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.dockerignore b/.dockerignore index 2a9d541..0d4799d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,6 +7,7 @@ *.sql.gz *.sqlite3 .cache +.env .project .idea .pydevproject diff --git a/.gitignore b/.gitignore index d798070..dc41d4d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__/ local_settings.py db.sqlite3 db.sqlite3-journal +db/ media/ # If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/ diff --git a/start.sh b/start.sh index 0e723d1..4041353 100644 --- a/start.sh +++ b/start.sh @@ -1,9 +1,6 @@ - cd /access_controller/ -if [ ! -f "/access_controller/db/zd_db.sqlite3" ]; then - python manage.py migrate -fi +python manage.py migrate python manage.py collectstatic --noinput -python manage.py runserver 0.0.0.0:8000 +daphne -b 0.0.0.0 access_controller.asgi:application