Skip to content

Commit fad6cc7

Browse files
committed
Changed app folder to src to avoid folder name conflict
1 parent 52b47c7 commit fad6cc7

File tree

15 files changed

+15
-15
lines changed

15 files changed

+15
-15
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ RUN pip install --no-cache-dir --no-index --find-links /app/wheelhouse -r requir
4646
rm -rf /app/wheelhouse
4747

4848
# Copy application source code
49-
COPY app/main.py ./
50-
COPY app/databases/ ./databases/
51-
COPY app/models/ ./models/
52-
COPY app/routes/ ./routes/
53-
COPY app/schemas/ ./schemas/
54-
COPY app/services/ ./services/
49+
COPY src/main.py ./src/
50+
COPY src/databases/ ./src/databases/
51+
COPY src/models/ ./src/models/
52+
COPY src/routes/ ./src/routes/
53+
COPY src/schemas/ ./src/schemas/
54+
COPY src/services/ ./src/services/
5555

5656
# https://rules.sonarsource.com/docker/RSPEC-6504/
5757

@@ -78,4 +78,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
7878
CMD ["./healthcheck.sh"]
7979

8080
ENTRYPOINT ["./entrypoint.sh"]
81-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "9000"]
81+
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "9000"]
File renamed without changes.
File renamed without changes.
File renamed without changes.

app/main.py renamed to src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import logging
1313
from typing import AsyncIterator
1414
from fastapi import FastAPI
15-
from app.routes import player, health
15+
from src.routes import player, health
1616

1717
# https://github.com/encode/uvicorn/issues/562
1818
UVICORN_LOGGER = "uvicorn.error"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

app/routes/player.py renamed to src/routes/player.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
from sqlalchemy.ext.asyncio import AsyncSession
2323
from aiocache import SimpleMemoryCache
2424

25-
from app.databases.player import generate_async_session
26-
from app.models.player import PlayerModel
27-
from app.services import player
25+
from src.databases.player import generate_async_session
26+
from src.models.player import PlayerModel
27+
from src.services import player
2828

2929
router = APIRouter()
3030
simple_memory_cache = SimpleMemoryCache()
File renamed without changes.

app/schemas/player.py renamed to src/schemas/player.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""
88

99
from sqlalchemy import Column, String, Integer, Boolean
10-
from app.databases.player import Base
10+
from src.databases.player import Base
1111

1212

1313
class Player(Base):
File renamed without changes.

app/services/player.py renamed to src/services/player.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
from sqlalchemy import select
1616
from sqlalchemy.ext.asyncio import AsyncSession
1717
from sqlalchemy.exc import SQLAlchemyError
18-
from app.models.player import PlayerModel
19-
from app.schemas.player import Player
18+
from src.models.player import PlayerModel
19+
from src.schemas.player import Player
2020

2121
# Create -----------------------------------------------------------------------
2222

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import warnings
22
import pytest
33
from fastapi.testclient import TestClient
4-
from app.main import app
4+
from src.main import app
55

66
# Suppress the DeprecationWarning from httpx
77
warnings.filterwarnings("ignore", category=DeprecationWarning)

0 commit comments

Comments
 (0)