diff --git a/Dockerfile b/Dockerfile index 007eebe..b5f229f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,10 @@ RUN pip install -r requirments.txt RUN pip install gunicorn # Copy the application code -COPY src/* . - +COPY src/ . # Expose the port for Gunicorn EXPOSE 8000 # Run migrations and then start Gunicorn # CMD ["sh", "-c", "python manage.py migrate && gunicorn --workers=3 --bind=0.0.0.0:8000 core.wsgi:application"] -ENTRYPOINT [ "./docker-entrypoint.sh" ] \ No newline at end of file +ENTRYPOINT [ "sh","/app/docker-entrypoint.sh" ] \ No newline at end of file diff --git a/src/docker-entrypoint.sh b/src/docker-entrypoint.sh index 405fa1b..f9d8117 100755 --- a/src/docker-entrypoint.sh +++ b/src/docker-entrypoint.sh @@ -1,4 +1,4 @@ -#!/usr/bin/sh +#!ash python manage.py collectstatic --noinput python manage.py migrate gunicorn --workers=3 --bind=0.0.0.0:8000 core.wsgi:application \ No newline at end of file