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