mirror of https://github.com/interlegis/sapl.git
4 changed files with 56 additions and 4 deletions
@ -0,0 +1,33 @@ |
|||||
|
FROM alpine:3.8 |
||||
|
|
||||
|
ENV BUILD_PACKAGES postgresql-dev graphviz-dev graphviz build-base git pkgconfig \ |
||||
|
python3-dev libxml2-dev jpeg-dev libressl-dev libffi-dev libxslt-dev \ |
||||
|
nodejs py3-lxml py3-magic postgresql-client poppler-utils antiword \ |
||||
|
curl jq openssh-client vim openssh-client bash |
||||
|
|
||||
|
RUN apk update --update-cache && apk upgrade |
||||
|
|
||||
|
RUN apk --update add fontconfig ttf-dejavu && fc-cache -fv |
||||
|
|
||||
|
RUN apk add --no-cache python3 nginx tzdata && \ |
||||
|
python3 -m ensurepip && \ |
||||
|
rm -r /usr/lib/python*/ensurepip && \ |
||||
|
pip3 install --upgrade pip setuptools && \ |
||||
|
rm -r /root/.cache && \ |
||||
|
rm -f /etc/nginx/conf.d/* |
||||
|
|
||||
|
RUN mkdir -p /var/interlegis/sapl && \ |
||||
|
apk add --update --no-cache $BUILD_PACKAGES |
||||
|
|
||||
|
WORKDIR /var/interlegis/sapl/ |
||||
|
|
||||
|
ADD . /var/interlegis/sapl/ |
||||
|
|
||||
|
RUN pip install -r /var/interlegis/sapl/requirements/dev-requirements.txt --upgrade setuptools && \ |
||||
|
rm -r /root/.cache |
||||
|
|
||||
|
RUN rm -rf /var/interlegis/sapl/celery/celery_log/* |
||||
|
|
||||
|
RUN chmod +x /var/interlegis/sapl/celery/celery_start/start.sh |
||||
|
|
||||
|
CMD ["/var/interlegis/sapl/celery/celery_start/start.sh"] |
||||
@ -0,0 +1,9 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
celery multi start 2 -A sapl -l info -Q:1 email_queue -c:1 1 -Q:2 celery -c:2 1 --pidfile=./celery/celery_log/%n.pid --logfile=./celery/celery_log/%n%I.log |
||||
|
|
||||
|
echo "Celery started" |
||||
|
|
||||
|
while true; do sleep 2; done |
||||
|
|
||||
|
echo "Celery finished" |
||||
Loading…
Reference in new issue