Backend Hot Reload Not Working in Docker Compose Development Environmen #1411
-
First Check
Commit to Help
Example Code
DescriptionIn the development environment using Docker Compose, changes made to the source code are not automatically updating in the backend container. It is necessary to manually restart the container for the modifications to be applied, which interrupts the development workflow. Operating SystemLinux Operating System Detailsdocker compose up -d Python Versionpython:3.10 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Answered by
niyazikemer
Nov 4, 2024
Replies: 1 comment 1 reply
-
I hope I understand you correctly, this is my way of development. (I'm a newbie)
Some sources: |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
YuriiMotov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I hope I understand you correctly, this is my way of development. (I'm a newbie)
uv sync
Start the app:
docker compose watch
Stop the back-end on the docker
docker compose stop backend
get in backend folder on the local environment
cd backend
activate the virtual environment
source .venv/bin/activate
start the FastApi on the local environment and work there, changes immediately effect the docker
fastapi dev app/main.py --reload
Some sources:
development documentation
backend development documentation