TkTech / notifico

IRC Message Relay
http://n.tkte.ch
MIT License
155 stars 39 forks source link

Can not start the containers #215

Closed sdegrande closed 1 year ago

sdegrande commented 1 year ago

Using latest commit (e6ec475521), running a centos 7.9 in a VM.

When launching 'docker-compose up', I've got errors from bots_1, workers_1 and frontend_1:

frontend_1  |   File "/code/notifico/__init__.py", line 87, in create_app
frontend_1  |     from notifico.views import account
frontend_1  | ImportError: bad magic number in 'notifico.views.account': b'\x03\xf3\r\n'
sdegrande commented 1 year ago

Solved by removing all .pyc binaries... I don't know what happen when they were first built...

sdegrande commented 1 year ago

Just had the same issue again: those .pyc are python 2.7 byte-compiled. but python 3.10 is then used... I see no container with a python2.7 installed, so I do not understand who is compiling those python scripts...

Anyhow, once I remove the .pyc and restart the containers, I've got an error when accessing the frontend:

sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "irc_network" does not exist
LINE 2: FROM irc_network
             ^

[SQL: SELECT count(irc_network.id) AS count_1 
FROM irc_network]
(Background on this error at: https://sqlalche.me/e/14/f405)
TkTech commented 1 year ago

Just had the same issue again: those .pyc are python 2.7 byte-compiled. but python 3.10 is then used... I see no container with a python2.7 installed, so I do not understand who is compiling those python scripts...

That's...interesting... .pyc files should be outright disabled, will take a look.

Anyhow, once I remove the .pyc and restart the containers, I've got an error when accessing the frontend:

You need to run the migrations, something like this should work:

docker-compose exec frontend alembic upgrade head

I need to update the docs!

sdegrande commented 1 year ago

Sorry, I do not know a lot about all those 'modern' python tooling (I'm mainly a C/C++ dev), but it does not work for me. alembic is not installed into the frontend container. I installed it, and then when loading migrations/env.py it requests for flask, that I installed, and notifico... And I'm stuck at that point...

TkTech commented 1 year ago

There's a new readme that should be easier to follow from scratch. If you're still interested in this project let me know if it worked better for you :)

sdegrande commented 1 year ago

I'll try it and let you know... And yes, I'm still interested by notifico.

I would also like to "unify" our IRC notifications. We currently have notifications from ReviewBoard and Buildbot. We also use RoundUp, but are migrating to the Codeberg issue tracker.

I intend to have a look at ReviewBoard and Buildbot integration to Notifico, but can't tell when I'll have time to spend on it...