mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-11 04:58:33 +03:00
* Update pyproject.toml * add pre-commit * Create .pre-commit-config.yaml * Comment out ruff * Update .pre-commit-config.yaml * General formatting * Create format-and-fail.yml * Update ci.yml * Add pre-commit to dev dependencies * Update pyproject.toml
34 lines
903 B
Docker
34 lines
903 B
Docker
# From python:3.10
|
|
FROM bellingcat/auto-archiver:v0.13.4
|
|
|
|
# set work directory
|
|
WORKDIR /aa-api
|
|
|
|
RUN curl -fsSL https://get.docker.com -o get-docker.sh && \
|
|
sh get-docker.sh
|
|
# set environment variables
|
|
ENV LANG=C.UTF-8 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
POETRY_NO_INTERACTION=1 \
|
|
POETRY_VIRTUALENVS_IN_PROJECT=1 \
|
|
POETRY_VIRTUALENVS_CREATE=1
|
|
|
|
# install dependencies
|
|
RUN apt update -y && \
|
|
apt install -y python3-venv && \
|
|
python3 -m venv ./poetry-venv && \
|
|
./poetry-venv/bin/python -m pip install --upgrade pip && \
|
|
./poetry-venv/bin/python -m pip install "poetry>=2.0.0,<3.0.0"
|
|
COPY pyproject.toml poetry.lock ./
|
|
RUN ./poetry-venv/bin/poetry install --without dev --no-root --no-cache
|
|
|
|
# install dependencies
|
|
|
|
# copy source code and .env files over
|
|
COPY alembic.ini ./
|
|
COPY ./app/ ./app/
|
|
COPY user-groups.* ./app/
|
|
|
|
ENTRYPOINT ["./poetry-venv/bin/poetry", "run"]
|