forked from miguelgrinberg/flask-celery-example
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 781 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM python:3.6.12-slim-buster
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 PYTHONUNBUFFERED=1
# Install and configure redis
RUN apt-get update
RUN apt-get install -y redis-server
COPY deploy/redis.conf /etc/redis.conf
ENV APP_DIR=/flask-celery-example
RUN mkdir -p ${APP_DIR}
WORKDIR ${APP_DIR}
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir gunicorn
# RUN rm requirements.txt
COPY . ${APP_DIR}
# Install supervisor and add services
RUN apt-get install -y supervisor nano
RUN mkdir -p /var/log/supervisord/
COPY deploy/supervisor/*.conf /etc/supervisor/conf.d/
# RUN ls -la /etc/supervisor/conf.d/
RUN mv /etc/supervisor/conf.d/supervisord.conf /etc/supervisor/
RUN mkdir -p /var/log/celery/
CMD ["/usr/bin/supervisord"]