-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfileDeploy.txt
More file actions
53 lines (35 loc) · 1.01 KB
/
Copy pathdockerfileDeploy.txt
File metadata and controls
53 lines (35 loc) · 1.01 KB
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
49
50
51
52
53
# Usa la imagen base de GDAL en Ubuntu
FROM ghcr.io/osgeo/gdal:ubuntu-full-latest AS builder
ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-dev \
python3-pip \
python3-venv \
gcc \
g++ \
libffi-dev \
libpq-dev \
libgeos-dev \
gdal-bin \
wget && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
wget http://download.osgeo.org/gdal/2.4.0/gdal-2.4.0.tar.gz && \
tar -xzf gdal-2.4.0.tar.gz
WORKDIR /app
RUN python3 -m venv /app/venv
ENV VIRTUAL_ENV=/app/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN /app/venv/bin/pip install --upgrade pip
COPY requirements.txt /app/
RUN /app/venv/bin/pip install --no-cache-dir -r requirements.txt
FROM python:3-alpine AS runner
WORKDIR /app
COPY --from=builder /app/venv venv
COPY escala_project escala_project
ENV VIRTUAL_ENV=/app/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ENV PORT=8000
EXPOSE ${PORT}
CMD gunicorn --bind :${PORT} --workers 2 escala_project.wsgi