diff --git a/Dockerfile b/Dockerfile index 5b4e6ed..7718247 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,7 @@ COPY --chown=website ./website ./website RUN SECRET_KEY=none python manage.py collectstatic --noinput --clear -CMD python manage.py migrate --noinput && gunicorn -c etc/gunicorn.conf.py +CMD ["/app/etc/entrypoints/web"] # Just dev stuff FROM production as dev diff --git a/etc/entrypoints/cron b/etc/entrypoints/cron new file mode 100755 index 0000000..50cca3e --- /dev/null +++ b/etc/entrypoints/cron @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +exec supercronic etc/crontab diff --git a/etc/entrypoints/nginx b/etc/entrypoints/nginx new file mode 100755 index 0000000..b9db4da --- /dev/null +++ b/etc/entrypoints/nginx @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +exec nginx -g "daemon off;" diff --git a/etc/entrypoints/web b/etc/entrypoints/web new file mode 100755 index 0000000..e4146f6 --- /dev/null +++ b/etc/entrypoints/web @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -e + +python manage.py migrate --noinput + +exec gunicorn -c etc/gunicorn.conf.py diff --git a/etc/entrypoints/worker b/etc/entrypoints/worker new file mode 100755 index 0000000..c7315ee --- /dev/null +++ b/etc/entrypoints/worker @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +exec python manage.py rqworker --with-scheduler