Add helper entrypoint scripts
This keeps the configuration for what to run inside the container, without adding the extra weight and config of s6
This commit is contained in:
parent
7d20ccd8d7
commit
4326dc2299
5 changed files with 23 additions and 1 deletions
|
@ -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
|
||||
|
|
5
etc/entrypoints/cron
Executable file
5
etc/entrypoints/cron
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
exec supercronic etc/crontab
|
5
etc/entrypoints/nginx
Executable file
5
etc/entrypoints/nginx
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
exec nginx -g "daemon off;"
|
7
etc/entrypoints/web
Executable file
7
etc/entrypoints/web
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
python manage.py migrate --noinput
|
||||
|
||||
exec gunicorn -c etc/gunicorn.conf.py
|
5
etc/entrypoints/worker
Executable file
5
etc/entrypoints/worker
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
exec python manage.py rqworker --with-scheduler
|
Loading…
Reference in a new issue