I have run the alembic upgrade head using docker. However, I get a models error and cannot run the upgrade head. To solve this, I tried to modify the import statement. But I can't solve it at all. What should I do?
.PHONY: alembic.run
alembic.run: ## run alembic
@docker run --rm -it \
--env-file $(ENVFILE_FOLDER)/.alembic \
--net $(DOCKER_NETWORK) \
--name $(ALEMBIC_CONTAINER) \
--volume $(ALEMBIC_FOLDER)/alembic:/workspace/alembic:rw \
$(ALEMBIC_CONTAINER) alembic $(cmd)
from models.db import Base
ModuleNotFoundError: No module named 'models'
make: *** [Makefile:68: alembic.run] Error 1
I have made several attempts to change the import statement in env.py and run it. However, I cannot solve the problem at all. Maybe it's a bad folder configuration. For the execution environment, arbitrary values are assigned to environment variables. The program is also executed using make file.