dropbox / nsot

Network Source of Truth is an open source IPAM and network inventory database
https://nsot.readthedocs.io
Other
398 stars 66 forks source link

psycopg2 version behind when using Docker and Postgres #369

Open bswinnerton opened 4 years ago

bswinnerton commented 4 years ago

When attempting to boot the NSoT Docker image with ENV['DB_ENGINE'] = django.db.backends.postgresql, the container fails to start with:

ImproperlyConfigured: psycopg2_version 2.5.4 or newer is required; you have 2.4.5 (dt dec mx pq3 ext)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/logan/runner.py", line 116, in settings_callback
    'settings': settings,
  File "/usr/local/lib/python2.7/dist-packages/nsot/util/core.py", line 341, in initialize_app
    connections['default'].allow_thread_sharing = True
  File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 211, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py", line 115, in load_backend
    return import_module('%s.base' % backend_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql/base.py", line 36, in <module>
    raise ImproperlyConfigured("psycopg2_version 2.5.4 or newer is required; you have %s" % psycopg2.__version__)

At first, I thought this may be due to the fact that nsot/nsot:latest does not appear to have been bumped with the release of 1.4.5, but manually building the image with that version seems to have the same problem.