Staging branch docker-compose up fails
When trying to run the docker-compose you get an error related to a missing 'config' module.
Starting threatkb_db_1 ... done Starting threatkb_threatkb_agent_1 ... done Starting threatkb_redis_1 ... done Starting threatkb_threatkb_1 ... done Attaching to threatkb_db_1, threatkb_redis_1, threatkb_threatkb_agent_1, threatkb_threatkb_1 redis_1 | 1:C 12 Sep 2022 22:04:53.782 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo db_1 | 2022-09-12 22:04:52+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started. redis_1 | 1:C 12 Sep 2022 22:04:53.782 # Redis version=7.0.4, bits=64, commit=00000000, modified=0, pid=1, just started redis_1 | 1:C 12 Sep 2022 22:04:53.782 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf redis_1 | 1:M 12 Sep 2022 22:04:53.784 # You requested maxclients of 10000 requiring at least 10032 max file descriptors. threatkb_1 | + env threatkb_1 | HOSTNAME=7cc5db17fb41 threatkb_1 | PWD=/opt/threatkb threatkb_1 | SQL_HOST=db threatkb_1 | MYSQL_ROOT_PASSWORD=b5vXcqzUtn4suyS threatkb_1 | HOME=/root threatkb_1 | SQL_PROTOCOL=mysql threatkb_1 | LISTEN_PORT=5000 threatkb_1 | [email protected] threatkb_1 | SQL_PASSWORD=b5vXcqzUtn4suyS threatkb_1 | SHLVL=1 threatkb_1 | SQL_USERNAME=threatkb threatkb_1 | SQL_DATABASE=threatkb threatkb_1 | REDIS_CACHE_URL=redis://localhost:6379/0 threatkb_1 | LISTEN_ON=0.0.0.0 threatkb_1 | THREATKB_PASS=b5vXcqzUtn4suyS threatkb_1 | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin threatkb_1 | SQL_PORT=3306 threatkb_1 | _=/usr/bin/env redis_1 | 1:M 12 Sep 2022 22:04:53.784 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted. redis_1 | 1:M 12 Sep 2022 22:04:53.784 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'. redis_1 | 1:M 12 Sep 2022 22:04:53.784 * monotonic clock: POSIX clock_gettime redis_1 | 1:M 12 Sep 2022 22:04:53.793 * Running mode=standalone, port=6379. redis_1 | 1:M 12 Sep 2022 22:04:53.793 # Server initialized redis_1 | 1:M 12 Sep 2022 22:04:53.796 * Loading RDB produced by version 7.0.4 redis_1 | 1:M 12 Sep 2022 22:04:53.796 * RDB age 7592 seconds redis_1 | 1:M 12 Sep 2022 22:04:53.796 * RDB memory usage when created 0.56 Mb redis_1 | 1:M 12 Sep 2022 22:04:53.796 * Done loading RDB, keys loaded: 0, keys expired: 0. redis_1 | 1:M 12 Sep 2022 22:04:53.796 * DB loaded from disk: 0.002 seconds redis_1 | 1:M 12 Sep 2022 22:04:53.796 * Ready to accept connections db_1 | 2022-09-12 22:04:52+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' db_1 | 2022-09-12 22:04:52+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.29-1.el8 started. db_1 | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock' db_1 | 2022-09-12T22:04:52.961211Z 0 [Warning] [MY-010139] [Server] Changed limits: max_open_files: 1024 (requested 8161) db_1 | 2022-09-12T22:04:52.961217Z 0 [Warning] [MY-010142] [Server] Changed limits: table_open_cache: 431 (requested 4000) db_1 | 2022-09-12T22:04:53.351132Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead. db_1 | 2022-09-12T22:04:53.351158Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.29) starting as process 1 db_1 | 2022-09-12T22:04:53.365213Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. db_1 | 2022-09-12T22:04:53.720341Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. db_1 | 2022-09-12T22:04:53.947328Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. db_1 | 2022-09-12T22:04:53.947394Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. threatkb_agent_1 | + env threatkb_agent_1 | + cd /opt/threatkb threatkb_agent_1 | + ./wait-for-it.sh db:3306 -- echo 'db is up' db_1 | 2022-09-12T22:04:53.952270Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. db_1 | 2022-09-12T22:04:53.984158Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.29' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL. threatkb_1 | + cd /opt/threatkb threatkb_1 | + ./wait-for-it.sh db:3306 -- echo 'db is up' threatkb_agent_1 | REDIS_TASK_SERIALIZER=json threatkb_agent_1 | HOSTNAME=331d6694ddcd threatkb_agent_1 | REDIS_ACCEPT_CONTENT=["json"] threatkb_agent_1 | C_FORCE_ROOT=1 threatkb_agent_1 | PWD=/opt/threatkb threatkb_agent_1 | HOME=/root threatkb_agent_1 | RUN_AGENT=1 threatkb_agent_1 | REDIS_RESULT_SERIALIZER=json threatkb_agent_1 | SHLVL=1 threatkb_agent_1 | REDIS_BROKER_URL=redis://redis:6379/0 threatkb_agent_1 | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin threatkb_agent_1 | _=/usr/bin/env threatkb_1 | wait-for-it.sh: waiting 15 seconds for db:3306 threatkb_agent_1 | wait-for-it.sh: waiting 15 seconds for db:3306 threatkb_agent_1 | wait-for-it.sh: db:3306 is available after 0 seconds threatkb_agent_1 | db is up threatkb_agent_1 | + [[ ! -z 1 ]] threatkb_agent_1 | + env/bin/celery -A app.celery worker --uid uwsgi --loglevel=info threatkb_1 | wait-for-it.sh: db:3306 is available after 0 seconds threatkb_1 | db is up threatkb_1 | + [[ ! -z '' ]] threatkb_1 | + find . -name '*.pyc' -exec rm -f '{}' ';' threatkb_1 | + env/bin/flask db upgrade threatkb_agent_1 | Usage: celery [OPTIONS] COMMAND [ARGS]... threatkb_agent_1 | Try 'celery --help' for help. threatkb_agent_1 | threatkb_agent_1 | Error: Invalid value for '-A' / '--app': threatkb_agent_1 | Unable to load celery application. threatkb_agent_1 | While trying to load the module app.celery the following error occurred: threatkb_agent_1 | Traceback (most recent call last): threatkb_agent_1 | File "/opt/threatkb/env/lib/python3.8/site-packages/werkzeug/utils.py", line 547, in import_string threatkb_agent_1 | __import__(import_name) threatkb_agent_1 | ModuleNotFoundError: No module named 'config' threatkb_agent_1 | threatkb_agent_1 | During handling of the above exception, another exception occurred: threatkb_agent_1 | threatkb_agent_1 | Traceback (most recent call last): threatkb_agent_1 | File "/opt/threatkb/env/lib/python3.8/site-packages/celery/bin/celery.py", line 57, in convert threatkb_agent_1 | return find_app(value) threatkb_agent_1 | File "/opt/threatkb/env/lib/python3.8/site-packages/celery/app/utils.py", line 384, in find_app threatkb_agent_1 | sym = symbol_by_name(app, imp=imp) threatkb_agent_1 | File "/opt/threatkb/env/lib/python3.8/site-packages/kombu/utils/imports.py", line 56, in symbol_by_name threatkb_agent_1 | module = imp(module_name, package=package, **kwargs) threatkb_agent_1 | File "/opt/threatkb/env/lib/python3.8/site-packages/celery/utils/imports.py", line 105, in import_from_cwd threatkb_agent_1 | return imp(module, package=package) threatkb_agent_1 | File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module threatkb_agent_1 | return _bootstrap._gcd_import(name[level:], package, level) threatkb_agent_1 | File "<frozen importlib._bootstrap>", line 1014, in _gcd_import threatkb_agent_1 | File "<frozen importlib._bootstrap>", line 991, in _find_and_load threatkb_agent_1 | File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked threatkb_agent_1 | File "<frozen importlib._bootstrap>", line 671, in _load_unlocked threatkb_agent_1 | File "<frozen importlib._bootstrap_external>", line 848, in exec_module threatkb_agent_1 | File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed threatkb_agent_1 | File "/opt/threatkb/app/__init__.py", line 20, in <module> threatkb_agent_1 | app.config.from_object("config") threatkb_agent_1 | File "/opt/threatkb/env/lib/python3.8/site-packages/flask/config.py", line 174, in from_object threatkb_agent_1 | obj = import_string(obj) threatkb_agent_1 | File "/opt/threatkb/env/lib/python3.8/site-packages/werkzeug/utils.py", line 563, in import_string threatkb_agent_1 | reraise( threatkb_agent_1 | File "/opt/threatkb/env/lib/python3.8/site-packages/werkzeug/_compat.py", line 147, in reraise threatkb_agent_1 | raise value.with_traceback(tb) threatkb_agent_1 | File "/opt/threatkb/env/lib/python3.8/site-packages/werkzeug/utils.py", line 547, in import_string threatkb_agent_1 | __import__(import_name) threatkb_agent_1 | werkzeug.utils.ImportStringError: import_string() failed for 'config'. Possible reasons are: threatkb_agent_1 | threatkb_agent_1 | - missing __init__.py in a package; threatkb_agent_1 | - package or module path not included in sys.path; threatkb_agent_1 | - duplicated package or module name taking precedence in sys.path; threatkb_agent_1 | - missing module, class, function or variable; threatkb_agent_1 | threatkb_agent_1 | Debugged import: threatkb_agent_1 | threatkb_agent_1 | - 'config' not found. threatkb_agent_1 | threatkb_agent_1 | Original exception: threatkb_agent_1 | threatkb_agent_1 | ModuleNotFoundError: No module named 'config' threatkb_agent_1 | threatkb_agent_1 | wait-for-it.sh: waiting 15 seconds for db:3306 threatkb_agent_1 | wait-for-it.sh: db:3306 is available after 0 seconds threatkb_agent_1 | db is up threatkb_agent_1 | + [[ ! -z 1 ]] threatkb_agent_1 | + env/bin/celery -A app.celery worker --uid uwsgi --loglevel=info ^CGracefully stopping... (press Ctrl+C again to force)