Skip to content
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

Docker Update #2

Open
Snider opened this issue Feb 9, 2025 · 0 comments
Open

Docker Update #2

Snider opened this issue Feb 9, 2025 · 0 comments
Assignees

Comments

@Snider
Copy link

Snider commented Feb 9, 2025

Make it so docker compose up -d provides a working interface.

services:
  marzban:
    image: gozargah/marzban:latest
    restart: always
    env_file: .env
    network_mode: host
    volumes:
      - /var/lib/marzban:/var/lib/marzban

Produces

marzban-1  | Traceback (most recent call last):
marzban-1  |   File "/code/main.py", line 10, in <module>
marzban-1  |     from app import app, logger
marzban-1  |   File "/code/app/__init__.py", line 35, in <module>
marzban-1  |     from app import dashboard, jobs, routers, telegram  # noqa
marzban-1  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
marzban-1  |   File "/code/app/jobs/__init__.py", line 13, in <module>
marzban-1  |     spec.loader.exec_module(importlib.util.module_from_spec(spec))
marzban-1  |   File "/code/app/jobs/remove_expired_users.py", line 4, in <module>
marzban-1  |     from app.db import GetDB, crud
marzban-1  |   File "/code/app/db/__init__.py", line 4, in <module>
marzban-1  |     from .base import Base, SessionLocal, engine  # noqa
marzban-1  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
marzban-1  |   File "/code/app/db/base.py", line 17, in <module>
marzban-1  |     engine = create_engine(
marzban-1  |              ^^^^^^^^^^^^^^
marzban-1  |   File "<string>", line 2, in create_engine
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/sqlalchemy/util/deprecations.py", line 281, in warned
marzban-1  |     return fn(*args, **kwargs)  # type: ignore[no-any-return]
marzban-1  |            ^^^^^^^^^^^^^^^^^^^
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 599, in create_engine
marzban-1  |     dbapi = dbapi_meth(**dbapi_args)
marzban-1  |             ^^^^^^^^^^^^^^^^^^^^^^^^
marzban-1  |   File "/usr/local/lib/python3.12/site-packages/sqlalchemy/dialects/mysql/mysqldb.py", line 147, in import_dbapi
marzban-1  |     return __import__("MySQLdb")
marzban-1  |            ^^^^^^^^^^^^^^^^^^^^^
marzban-1  | ModuleNotFoundError: No module named 'MySQLdb'
@Snider Snider self-assigned this Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant