-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
35 lines (26 loc) · 1.11 KB
/
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
FROM nginx:1.23.3
ENV APP_DIR /app
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3.9 python3-setuptools python3-pip && \
rm -rf /var/lib/apt/lists/* && \
pip3 install --no-cache-dir supervisor==4.2.2 awscli awscli-cwlogs && \
aws configure set plugins.cwlogs cwlogs && \
mkdir -p ${APP_DIR} && \
mkdir -p /etc/nginx/sites-available && \
mkdir -p /etc/nginx/sites-enabled && \
mkdir -p /usr/share/nginx/html && \
mkdir -p /var/log/digitalmarketplace && \
rm -f /etc/nginx/nginx.conf /etc/nginx/sites-enabled/*
COPY requirements.txt ${APP_DIR}
RUN pip3 install -r ${APP_DIR}/requirements.txt
COPY static_files/* /usr/share/nginx/html/
COPY awslogs/awslogs.conf /etc/awslogs.conf
COPY awslogs/run.sh /awslogs.sh
COPY supervisor_stdout.py /usr/local/lib/python3.6/site-packages
COPY supervisor_stdout.py /usr/local/bin/supervisor_stdout
COPY supervisord.conf /etc/supervisord.conf
COPY nginx.sh /nginx.sh
COPY templates/ ${APP_DIR}/templates/
COPY scripts/ ${APP_DIR}/scripts/
CMD ["supervisord", "--configuration", "/etc/supervisord.conf"]