-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
✨ Mount /backend/app/alembic/versions as a volume inside container during development
#1431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
✨ Mount /backend/app/alembic/versions as a volume inside container during development
#1431
Conversation
/backend/app/alembic/versions as a volume inside container during development
This comment was marked as resolved.
This comment was marked as resolved.
|
As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR. |
This comment was marked as resolved.
This comment was marked as resolved.
YuriiMotov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Now changes made in backend/alembic/versions are visible inside the container.
Adding app/alembic/versions to ignore paths is needed to prevent infinite loop
| target: /app | ||
| ignore: | ||
| - ./backend/.venv | ||
| - app/alembic/versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./backend/.venv path was invalid - all paths in ignore are relative to path: ./backend. So, it expanded to ./backend/backend/.venv which does not exist.
I removed that invalid ./backend/.venv and added app/alembic/versions to prevent infinite loop on updating files in alembic/versions mounted volume
/backend/app/alembic/versions as a volume inside container during development/backend/app/alembic/versions as a volume inside container during development
I've mapped the Docker container's Alembic folder to the local directory, ensuring that any auto-generated migration files created by Alembic are automatically copied to the local development environment.