Add cron jobs for django-cas-server
This commit is contained in:
parent
2ebc58d026
commit
cce1588f75
@ -16,6 +16,7 @@ SHELL ["/bin/bash","-ex","-c"]
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
RUN apt-get update && apt-get install -y\
|
||||
build-essential\
|
||||
cron\
|
||||
locales\
|
||||
libgdal-dev\
|
||||
libpq-dev\
|
||||
@ -53,6 +54,9 @@ RUN python3 -m pip install -r requirements.txt
|
||||
# APP
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
COPY ./support/cron/* /etc/cron.d/
|
||||
RUN chmod 0644 /etc/cron.d/*\
|
||||
&& touch /var/log/cron.log
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
|
3
support/cron/django-cas
Normal file
3
support/cron/django-cas
Normal file
@ -0,0 +1,3 @@
|
||||
0 0 * * * cas-user /app/manage.py clearsessions
|
||||
*/5 * * * * cas-user /app/manage.py cas_clean_tickets
|
||||
5 0 * * * cas-user /app/manage.py cas_clean_sessions
|
Loading…
Reference in New Issue
Block a user