-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
39 lines (27 loc) · 1009 Bytes
/
Dockerfile
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
30
31
32
33
34
35
36
37
38
39
FROM python:3.11.7-slim
LABEL maintainer="Bartolome Sanchez Salado"
ENV ENVIRONMENT dev
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
git \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/log/gunicorn/
RUN touch /var/log/gunicorn/access.log
RUN touch /var/log/gunicorn/error.log
RUN chmod 640 /var/log/gunicorn/access.log
RUN chmod 640 /var/log/gunicorn/error.log
RUN mkdir -p /var/log/celery/
RUN touch /var/log/celery/worker.log
RUN chmod 640 /var/log/celery/worker.log
RUN mkdir -p /opt/lengcol/
WORKDIR /opt/lengcol
RUN wget https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz
RUN tar -C /usr/local/bin -xvzf dockerize-linux-amd64-v0.6.1.tar.gz
COPY requirements.txt .
RUN pip install -r requirements.txt --no-cache-dir
COPY . /opt/lengcol/
WORKDIR /opt/lengcol/lengcol/
EXPOSE 8000
CMD ["sh", "-c", "gunicorn lengcol.wsgi:application -c ../docker/gunicorn/settings/${ENVIRONMENT}.py"]