-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
35 lines (30 loc) · 936 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
FROM python:3.11
RUN apt-get update && apt-get install -y apache2 \
libapache2-mod-wsgi-py3 \
build-essential \
default-libmysqlclient-dev \
python3-pymysql \
python3-dev \
python3-pip \
python3-distutils \
python3-numpy \
python3-pandas \
vim \
&& apt-get clean \
&& apt-get autoremove \
&& cd /usr/local/bin \
&& pip3 --no-cache-dir install --upgrade pip \
&& rm -rf /var/lib/apt/lists/*
# Setup Apache
RUN a2enmod wsgi headers
COPY ./apache-flask.conf /etc/apache2/sites-available/apache-flask.conf
RUN a2ensite apache-flask
RUN a2dissite 000-default.conf
# Setup Logging
RUN ln -sf /proc/self/fd/1 /var/log/apache2/access.log && \
ln -sf /proc/self/fd/1 /var/log/apache2/error.log
WORKDIR /var/www/apache-flask
ENV PYTHONPATH "${PYTHONPATH}:/var/www/apache-flask:/usr/local/lib/python3.8/site-packages"
ENV PORT 80
EXPOSE 80
ENTRYPOINT ["/var/www/apache-flask/docker_start.sh"]