Skip to content

Commit

Permalink
fix(directory): handle directory structure change by #56
Browse files Browse the repository at this point in the history
  • Loading branch information
sushichan044 committed May 13, 2024
1 parent b30fb75 commit f869acd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Dockerfile → api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1

COPY pyproject.toml README.md ./
COPY birdxplorer/__init__.py ./birdxplorer/
COPY birdxplorer_api/__init__.py ./birdxplorer_api/
RUN pip install --no-cache-dir -e ".[${ENVIRONMENT}]"

FROM python:${PYTHON_VERSION_CODE}-slim-bookworm as runner
Expand All @@ -26,4 +26,4 @@ USER app
COPY --from=builder /usr/local/lib/python${PYTHON_VERSION_CODE}/site-packages /usr/local/lib/python${PYTHON_VERSION_CODE}/site-packages
COPY --chown=app:app . ./

ENTRYPOINT ["python", "-m", "uvicorn", "birdxplorer.main:app", "--host", "0.0.0.0"]
ENTRYPOINT ["python", "-m", "uvicorn", "birdxplorer_api.main:app", "--host", "0.0.0.0"]
2 changes: 2 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

# BirdXplorer API
8 changes: 4 additions & 4 deletions api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ authors = [
{name = "osoken"},
]
dynamic = [
"version",
"version",
]
readme = "../README.md"
readme = "README.md"
license = {file = "../LICENSE"}
requires-python = ">=3.10"

Expand Down Expand Up @@ -100,11 +100,11 @@ legacy_tox_ini = """
envlist = py310
[testenv]
setenv =
setenv =
VIRTUALENV_PIP = 24.0
deps =
-e .[dev]
commands =
commands =
black birdxplorer_api tests
isort birdxplorer_api tests
pytest
Expand Down
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
build:
args:
- ENVIRONMENT=dev
context: .
context: ./api
dockerfile: Dockerfile
env_file:
- .env
Expand Down

0 comments on commit f869acd

Please sign in to comment.