forked from hotosm/tasking-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (39 loc) · 1.04 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
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM quay.io/hotosm/base-python-image as base
LABEL version=0.1
LABEL maintainer="HOT Sysadmin <[email protected]>"
LABEL description="Builds backend docker image"
WORKDIR /usr/src/app
FROM base as builder
# Setup backend build-time dependencies
RUN apk update && \
apk add \
postgresql-dev \
gcc \
g++ \
python3-dev \
musl-dev \
libffi-dev \
geos-dev \
proj-util \
proj-dev \
make
COPY requirements.txt .
RUN pip install \
--prefix=/install \
--no-cache-dir \
--no-warn-script-location \
-r requirements.txt
# Setup backend runtime dependencies
FROM base
RUN apk update && \
apk add \
postgresql-libs geos proj-util
COPY --from=builder /install /usr/local
COPY backend backend/
COPY migrations migrations/
COPY scripts/world scripts/world/
COPY scripts/database scripts/database/
COPY manage.py .
ENV TZ UTC # Fix timezone (do not change - see issue #3638)
EXPOSE 5000
CMD ["gunicorn", "-c", "python:backend.gunicorn", "manage:application"]