Consolidate and organize config files (#61)

This commit is contained in:
Michael Plunkett
2025-03-03 08:10:23 -06:00
committed by GitHub
parent 9529784fa2
commit 85cec9fbb9
6 changed files with 17 additions and 15 deletions

View File

@@ -1,3 +0,0 @@
[run]
omit =
app/migrations/*

View File

@@ -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

View File

@@ -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"]

View File

@@ -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"]

View File

@@ -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"

View File

@@ -1,2 +0,0 @@
[pytest]
pythonpath = .