-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (27 loc) · 946 Bytes
/
Dockerfile
File metadata and controls
34 lines (27 loc) · 946 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
# Dockerfile for Source Collector FastAPI app
FROM python:3.11.9-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Set working directory
WORKDIR /app
COPY pyproject.toml uv.lock ./
# Install dependencies
ENV UV_PROJECT_ENVIRONMENT="/usr/local/"
RUN uv sync --locked --no-dev
# Must call from the root directory because uv does not add playwright to path
RUN playwright install-deps chromium
RUN playwright install chromium
# Download Spacy Model
RUN python -m spacy download en_core_web_sm
# Copy project files
COPY src ./src
COPY alembic.ini ./alembic.ini
COPY alembic ./alembic
COPY apply_migrations.py ./apply_migrations.py
COPY execute.sh ./execute.sh
COPY .project-root ./.project-root
# Expose the application port
EXPOSE 80
RUN chmod +x execute.sh
# Use the below for ease of local development, but remove when pushing to GitHub
# Because there is no .env file in the repository (for security reasons)
#COPY .env ./.env