forked from ITI/searcch-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (26 loc) · 938 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
#
# 7.3.4 has a nasty bug that broke requests.get for us; and other
# things for others: https://foss.heptapod.net/pypy/pypy/-/issues/3441
#
#FROM pypy:3.7-slim-buster
FROM pypy:3.7-7.3.3-slim-buster
USER root
RUN \
apt update \
&& apt install -y build-essential libpq-dev \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --upgrade pip setuptools wheel
WORKDIR /app
COPY requirements.txt .
RUN \
pip3 install --no-cache-dir -r requirements.txt \
&& mkdir -p logs
COPY searcch_backend ./searcch_backend
COPY setup.cfg setup.py run.py ./
ENV FLASK_INSTANCE_CONFIG_FILE=/app/config-production.py
ENV FLASK_APP=run:app
EXPOSE 80 5678
CMD ["gunicorn","--config","gunicorn_conf.py","run:app"]
# CMD ["flask","run","--host=0.0.0.0","--port=80"]
# CMD ["pypy", "-m", "debugpy", "--listen", "0.0.0.0:5678", "--wait-for-client", "-m", "flask","run","--host=0.0.0.0","--port=80", "--debugger"]
# CMD ["sleep", "infinity"]