-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 1015 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (24 loc) · 1015 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
30
31
32
33
34
FROM python:3.11-slim
MAINTAINER buzmakov
ENV TZ=Europe/Moscow
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& apt-get install -y nginx supervisor pkg-config \
libfreetype6-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements_docker.txt /var/www/storage/requirements_docker.txt
WORKDIR /var/www/storage/
RUN pip install --no-cache-dir -r requirements_docker.txt
COPY . /var/www/storage/
# RUN echo "MONGODB_URI = 'mongodb://database:27017'" > conf.py
ENV YOURAPPLICATION_SETTINGS=conf.py
# setup nginx
RUN mkdir -p logs && echo "daemon off;" >> /etc/nginx/nginx.conf \
&& rm /etc/nginx/sites-enabled/default \
&& cp /var/www/storage/storage_nginx.conf /etc/nginx/sites-available/ \
&& ln -s /etc/nginx/sites-available/storage_nginx.conf /etc/nginx/sites-enabled/
# setup supervisord
# RUN mkdir -p /var/log/supervisor
RUN cp storage_supervisord.conf /etc/supervisor/conf.d/
EXPOSE 5006
CMD ["supervisord", "-n"]