From 0bdb481a0ad3269541a8bdf3b75bfabf876fb536 Mon Sep 17 00:00:00 2001 From: Sabron Date: Thu, 28 Dec 2023 10:38:46 +0700 Subject: [PATCH] update : 28.12.2023 10:38:46,05 --- Dockerfile | 6 +++++- entrypoint.sh | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3762bae..454d4b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,4 +23,8 @@ RUN pip install -r req.txt USER cybercode -CMD ["gunicorn","-b","0.0.0.0:8001","repcofkk.wsgi:application"] +COPY ./entrypoint.sh / +ENTRYPOINT ["sh", "/entrypoint.sh"] + + +#CMD ["gunicorn","-b","0.0.0.0:8001","repcofkk.wsgi:application"] diff --git a/entrypoint.sh b/entrypoint.sh index 9fd3bac..17784df 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,9 +1,11 @@ #!/bin/sh +pip install -r req.txt + python ./manage.py migrate --no-input python ./manage.py collectstatic --no-input DJANGO_SUPERUSER_PASSWORD=$SUPER_USER_PASSWORD python ./manage.py createsuperuser --username $SUPER_USER_NAME --email $SUPER_USER_EMAIL --noinput -gunicorn ./repcofkk.wsgi:application --bind 0.0.0.0:8000 +#gunicorn ./repcofkk.wsgi:application --bind 0.0.0.0:8000