name: 🐛 Bug Report
about: Create a report to help us improve FireForm.
title: "[BUG]: PYTHONPATH=/app/src breaks api imports inside Docker"
labels: bug
assignees: ''
⚡️ Describe the Bug
Both the Dockerfile and docker-compose.yml set:
PYTHONPATH=/app/src
This places only the contents of src/ on Python’s path.
The api/ folder is located at the project root, not inside src/, so imports like:
from api.routes import templates
fail inside Docker with ModuleNotFoundError.
Local runs work because pytest.ini sets pythonpath = ., making environments inconsistent.
👣 Steps to Reproduce
-
Run:
make build && make up
-
Inside container:
python -c "from api.main import app"
-
Observe ModuleNotFoundError.
📉 Expected Behavior
Both src.* and api.* imports should work identically in local and Docker environments.
🖥️ Environment Information
- OS: Docker container
- Docker/Compose Version: Any
- Ollama Model used: N/A
📸 Screenshots/Logs
ModuleNotFoundError: No module named 'api'
🕵️ Possible Fix
Set:
ENV PYTHONPATH=/app
instead of /app/src in both Dockerfile and docker-compose.yml.
name: 🐛 Bug Report
about: Create a report to help us improve FireForm.
title: "[BUG]: PYTHONPATH=/app/src breaks api imports inside Docker"
labels: bug
assignees: ''
⚡️ Describe the Bug
Both the Dockerfile and docker-compose.yml set:
PYTHONPATH=/app/src
This places only the contents of
src/on Python’s path.The
api/folder is located at the project root, not insidesrc/, so imports like:from api.routes import templates
fail inside Docker with
ModuleNotFoundError.Local runs work because
pytest.inisetspythonpath = ., making environments inconsistent.👣 Steps to Reproduce
Run:
make build && make up
Inside container:
python -c "from api.main import app"
Observe ModuleNotFoundError.
📉 Expected Behavior
Both
src.*andapi.*imports should work identically in local and Docker environments.🖥️ Environment Information
📸 Screenshots/Logs
ModuleNotFoundError: No module named 'api'
🕵️ Possible Fix
Set:
ENV PYTHONPATH=/app
instead of
/app/srcin both Dockerfile and docker-compose.yml.