-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (20 loc) · 751 Bytes
/
Dockerfile
File metadata and controls
20 lines (20 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM ghcr.io/astral-sh/uv:0.10.10-debian-slim
WORKDIR /home
# Copying files over
# Index folder creation is required for operation when the indexes aren't present
RUN mkdir -p /home/app/indexes
COPY src/ pyproject.toml uv.lock .python-version README.md app.py app/
# Removing caching to keep the image lightweight
ENV UV_NO_CACHE=1
WORKDIR /home/app
# Install dependencies missing in slim images and then running the install
RUN apt-get update
RUN apt-get install -y ca-certificates
RUN update-ca-certificates
# Limit to relevant groups
RUN uv sync --group test --group app
# Run app
LABEL organisation="oss4climate"
EXPOSE 8080
ENV UV_LOCKED=1
CMD ["uv", "run", "gunicorn", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8080", "app:app"]