Cannot propagate alembic revision from container to file tree with docker watch #1370
Replies: 2 comments 5 replies
-
I am facing the same issue. As suggested by Docker documentation, sync only works one way: from host to container. With the current watch setup and not mounting the directory as a volume, generated alembic revision files are not synced back to the host. I tried adding back the volume mapping but it resulted in the following error: |
Beta Was this translation helpful? Give feedback.
-
As @yohaoquan mentioned correctly I would suggest to update the documentation where the alembic revisions are still advised to be run in the container. Actually actions should be done from now on the host. As well adding packages should be done on the host (This actually is adjusted in the docs, thx @tiangolo :)). Again run the following actions on your HOST not in the docker container.
I was in the lucky position to delete all my databases and start from scratch so I had no issues after doing it accidentally in the docker container. |
Beta Was this translation helpful? Give feedback.
-
First Check
Commit to Help
Example Code
Description
With the new recommended
docker compose watch
command to start the project, any db revision files generated by alembic inside the container will not be replicated in the host system.Operating System
Linux, Windows
Operating System Details
wsl2 on w11
Python Version
3.12.6
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions