-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
37 lines (27 loc) · 899 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
FROM ubuntu:19.10
ARG DATABASE_URL
ENV DATABASE_URL=${DATABASE_URL}
# Install system tools
RUN apt-get clean && \
apt-get -y update && \
apt-get install -y \
python3.7-dev \
build-essential \
postgresql-client \
libpq-dev \
virtualenv && \
apt-get clean
WORKDIR /anyway
COPY requirements.txt /anyway
COPY alembic.ini /anyway
COPY alembic /anyway/alembic
RUN virtualenv /venv3 -p python3
ENV VIRTUAL_ENV=/venv3
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# First copy only the requirement.txt, so changes in other files won't trigger a full pip reinstall
RUN . /venv3/bin/activate && \
pip install -U setuptools wheel && \
pip install --upgrade pip && \
pip install -r requirements.txt
COPY . /anyway
CMD . /venv3/bin/activate && FLASK_APP=anyway FLASK_DEBUG=1 flask run --host 0.0.0.0