diff --git a/Dockerfile b/Dockerfile index cf734c6..52cafbc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY ./manage.py . -RUN ./manage.py makemigrations # RUN ./manage.py migrate COPY docker-entrypoint.sh . diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index b942dc5..48fa0a7 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -4,7 +4,10 @@ echo "Collect static files" python manage.py collectstatic --noinput + # Apply database migrations +echo "Make migrations" +RUN ./manage.py makemigrations echo "Apply database migrations" python manage.py migrate diff --git a/mysite/settings.py b/mysite/settings.py index 24de387..790e7aa 100644 --- a/mysite/settings.py +++ b/mysite/settings.py @@ -24,7 +24,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = os.getenv("DJANGO_SECRET_KEY") # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False ALLOWED_HOSTS = ["localhost", "app.saccada.xyz"]