Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def client(db_session: AsyncSession) -> AsyncIterator[AsyncClient]:
"""
Async HTTP client with DB session override
"""
from src.main import app
from src.__main__ import app

async def override_get_db():
yield db_session
Expand Down
4 changes: 2 additions & 2 deletions backend/src/main.py → backend/src/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
ⒸAngelaMos | 2025
main.py
__main__.py
"""
import uvicorn

Expand All @@ -12,7 +12,7 @@

if __name__ == "__main__":
uvicorn.run(
"src.main:app",
"src.__main__:app",
host = settings.HOST,
port = settings.PORT,
reload = settings.RELOAD,
Expand Down
2 changes: 1 addition & 1 deletion infra/docker/fastapi.dev
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ RUN --mount=type=cache,target=/root/.cache/uv \

EXPOSE 8000

CMD ["sh", "-c", "uv run alembic upgrade head && uv run uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload"]
CMD ["sh", "-c", "uv run alembic upgrade head && uv run uvicorn src.__main__:app --host 0.0.0.0 --port 8000 --reload"]
2 changes: 1 addition & 1 deletion infra/docker/fastapi.prod
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1

CMD ["sh", "-c", "alembic upgrade head && gunicorn src.main:app --worker-class uvicorn.workers.UvicornWorker --workers 4 --bind 0.0.0.0:8000 --max-requests 1000 --max-requests-jitter 100 --access-logfile - --error-logfile -"]
CMD ["sh", "-c", "alembic upgrade head && gunicorn src.__main__:app --worker-class uvicorn.workers.UvicornWorker --workers 4 --bind 0.0.0.0:8000 --max-requests 1000 --max-requests-jitter 100 --access-logfile - --error-logfile -"]
Loading