-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (33 loc) · 967 Bytes
/
Copy pathDockerfile
File metadata and controls
43 lines (33 loc) · 967 Bytes
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
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
gcc \
g++ \
python3-dev \
libjpeg-dev \
zlib1g-dev \
libpng-dev \
libcairo2-dev \
gdal-bin \
libgdal-dev \
poppler-utils \
curl \
ca-certificates \
cron \
git \
tzdata \
&& rm -rf /var/lib/apt/lists/*
ENV GDAL_VERSION=3.4.1
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
/root/.local/bin/uv --version
ENV PATH="/root/.local/bin:$PATH"
ENV UV_HTTP_TIMEOUT=300
COPY backend/pyproject.toml backend/uv.lock ./
COPY backend/scripts ./scripts
COPY backend/ ./backend/
COPY config/crontab ./config/crontab
RUN uv pip install -e ./backend --system
RUN chmod +x /app/scripts/start_cron.sh
RUN mkdir -p logs static/maps
EXPOSE 8000
CMD ["bash", "-lc", "cd /app/backend && exec uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers ${WEB_UVICORN_WORKERS:-2} --log-level info"]