mealie
mealie copied to clipboard
[BUG] - alembic.util.exc.CommandError: Path doesn't exist: '/alembic'
First Check
- [X] This is not a feature request.
- [X] I added a very descriptive title to this issue (title field is above this).
- [X] I used the GitHub search to find a similar issue and didn't find it.
- [X] I searched the Mealie documentation, with the integrated search.
- [X] I already read the docs and didn't find an answer.
- [ ] This issue can be replicated on the demo site (https://demo.mealie.io/).
What is the issue you are experiencing?
I am trying to install Mealie on a docker container using a pre-existing Postgresql. After installation I was not able to log in using the default credentials. I found in another bug report that the cause could be that the database already existed during installation. This was the case because the sql-user for mealie doesn't have permission to create a database, so I created one on beforehand. The solution given in that thread was then to run init_db.py. This was the result:
root@docker:~/docker/mealie# docker exec mealie python /app/mealie/db/init_db.py INFO: 20-Feb-24 17:43:03 Database connection established. Traceback (most recent call last): File "/app/mealie/db/init_db.py", line 113, in <module> main() File "/app/mealie/db/init_db.py", line 91, in main if db_is_at_head(alembic_cfg): File "/app/mealie/db/init_db.py", line 49, in db_is_at_head directory = script.ScriptDirectory.from_config(alembic_cfg) File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/script/base.py", line 226, in from_config return ScriptDirectory( File "/opt/pysetup/.venv/lib/python3.10/site-packages/alembic/script/base.py", line 107, in __init__ raise util.CommandError( alembic.util.exc.CommandError: Path doesn't exist: '/alembic'. Please use the 'init' command to create a new scripts folder.
When I execute the init script, this was the result:
root@docker:~/docker/mealie# docker exec mealie python /opt/poetry/venv/lib/python3.10/site-packages/poetry/console/commands/init.py Traceback (most recent call last): File "/opt/poetry/venv/lib/python3.10/site-packages/poetry/console/commands/init.py", line 12, in <module> from cleo.helpers import option ModuleNotFoundError: No module named 'cleo'
Steps to Reproduce
- Create database 'mealie' on preexisting postgresql
- Install mealie docker container
- Notice you can't log in into the UI given the default credentials and notice database is empty
- Run
docker exec mealie python /app/mealie/db/init_db.py
Please provide relevant logs
Mealie Version
[ghcr.io/mealie-recipes/mealie:v1.1.0]
Deployment
Docker (Linux)
Additional Deployment Details
Pre-existing postgres