mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-08 03:28:35 +03:00
Consolidate and organize config files (#61)
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
[run]
|
||||
omit =
|
||||
app/migrations/*
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: web.Dockerfile
|
||||
dockerfile: docker/web/Dockerfile
|
||||
restart: always
|
||||
env_file: .env.prod
|
||||
environment:
|
||||
@@ -31,7 +31,7 @@ services:
|
||||
worker:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: worker.Dockerfile
|
||||
dockerfile: docker/worker/Dockerfile
|
||||
restart: always
|
||||
env_file: .env.prod
|
||||
command: celery --app=app.worker.main.celery worker -Q high_priority,low_priority --concurrency=${CONCURRENCY} --max-tasks-per-child=100
|
||||
|
||||
@@ -10,13 +10,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip install --no-cache-dir poetry
|
||||
COPY pyproject.toml poetry.lock README.md .
|
||||
COPY ../../pyproject.toml ../../poetry.lock ../../README.md ./
|
||||
RUN poetry install --with web --no-interaction --no-ansi --no-cache
|
||||
|
||||
# Copy the application code and configurations
|
||||
COPY alembic.ini ./
|
||||
COPY ./app/ ./app/
|
||||
COPY user-groups.* ./app/
|
||||
COPY ../../alembic.ini ./
|
||||
COPY ../../app ./app/
|
||||
COPY ../../user-groups.* ./app/
|
||||
|
||||
# Run the FastAPI app with Uvicorn
|
||||
ENTRYPOINT ["poetry", "run"]
|
||||
@@ -20,14 +20,14 @@ RUN apt update -y && \
|
||||
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 ./
|
||||
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/
|
||||
COPY ../../alembic.ini ./
|
||||
COPY ../../app ./app/
|
||||
COPY ../../user-groups.* ./app/
|
||||
|
||||
ENTRYPOINT ["./poetry-venv/bin/poetry", "run"]
|
||||
@@ -31,6 +31,13 @@ dependencies = [
|
||||
"requests (>=2.25.1)",
|
||||
"pyopenssl (>=23.3.0)",
|
||||
]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
pythonpath = "."
|
||||
|
||||
[tool.coverage.run]
|
||||
omit = ["app/migrations/*"]
|
||||
|
||||
[tool.poetry.group.worker.dependencies]
|
||||
watchdog = ">=6.0.0,<7.0.0"
|
||||
setuptools = "^75.8.0"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
[pytest]
|
||||
pythonpath = .
|
||||
Reference in New Issue
Block a user