-
Notifications
You must be signed in to change notification settings - Fork 81
Description
Hi there,
Thanks for making great software!
Unforch I can't get this working to check it out...
I followed these instructions from readme.md to test:
Developer Quickstart
Make sure you have Docker installed and then:
git clone https://github.com/lucyparsons/OpenOversight.git
cd OpenOversight
make dev
but that fails.
I get make: *** [Makefile:29: create_db] Error 1.
See screen dump below.
Here's what I tried on a fresh Ubuntu 22.04 server, running via Virtual Box on a Linux machine, making sure to have docker installed as readme.md mentions (and a guess at other necessary things not mentioned such as python3-venv and libpq-dev etc...
Fresh Ubuntu Install, ssh into it, then ran:
sudo apt update
sudo apt full-upgrade
sudo apt install python3 python3-pip python3-setuptools python3-all python3-all-dev python3-venv libpq-dev
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce docker-compose
sudo mkdir -p /var/www/
sudo apt install acl
sudo setfacl --recursive --modify u:test:rwx /var/www && sudo setfacl --default --recursive --modify u:test:rwx /var/www
cd /var/www
ll
git clone https://github.com/lucyparsons/OpenOversight.git
cd OpenOversight
sudo make dev
Output goes as follows, with crash at the end:
touch service_account_key.json || \
(echo "Need to delete that empty directory first"; \
sudo rm -d service_account_key.json/; \
touch service_account_key.json)
if [ ! -f .env ]; then cp .env.example .env; fi
docker compose build
WARN[0000] The "APPROVE_REGISTRATIONS" variable is not set. Defaulting to a blank string.
[+] Building 238.1s (24/24) FINISHED
=> [internal] load local bake definitions 0.0s
=> => reading from stdin 966B 0.0s
=> [web internal] load build definition from Dockerfile-dev 0.1s
=> => transferring dockerfile: 798B 0.0s
=> [web-test internal] load build definition from Dockerfile-test 0.0s
=> => transferring dockerfile: 979B 0.0s
=> [web internal] load metadata for docker.io/library/python:3.11-bullseye 3.0s
=> [web-test internal] load .dockerignore 0.0s
=> => transferring context: 190B 0.0s
=> [web 1/7] FROM docker.io/library/python:3.11-bullseye@sha256:df0bd610af061603b29d63eb82027b64d5a3f15506e39270422b10b2a55079fc 14.3s
=> => resolve docker.io/library/python:3.11-bullseye@sha256:df0bd610af061603b29d63eb82027b64d5a3f15506e39270422b10b2a55079fc 0.0s
=> => sha256:df03755c797fff28a10d05180264ac3bca8e9758ef912234965d3eab57df5404 249B / 249B 0.5s
=> => sha256:700f3cd68da74eaa60fbf5bdbd028fe4e96c6ce3fc5fabc968785547b3b7373d 6.05MB / 6.05MB 1.0s
=> => sha256:3230e199415c0a9a350ca767c663d1074e306c84bd56ef31a296b4b455f8700f 24.68MB / 24.68MB 2.1s
=> => sha256:f0f51ee5c79e1ef5812268320c854e2eaf0bb5f4e2cf2a7974448200d36854de 197.14MB / 197.14MB 7.1s
=> => sha256:2be42d221bda6286090b1656c911554463aed2c0d506c236e16250de9b9e4667 15.77MB / 15.77MB 2.6s
=> => sha256:54d1704eb717ce17ad2843f567b5defc32883042e6e9f97e2bcf2ce3c282677b 54.76MB / 54.76MB 3.5s
=> => sha256:632ef5283d0fcf0e3a19d6c5dbcc294922d142b506d2ab494fb73004518cdc31 53.75MB / 53.75MB 2.9s
=> => extracting sha256:632ef5283d0fcf0e3a19d6c5dbcc294922d142b506d2ab494fb73004518cdc31 2.2s
=> => extracting sha256:2be42d221bda6286090b1656c911554463aed2c0d506c236e16250de9b9e4667 0.3s
=> => extracting sha256:54d1704eb717ce17ad2843f567b5defc32883042e6e9f97e2bcf2ce3c282677b 1.4s
=> => extracting sha256:f0f51ee5c79e1ef5812268320c854e2eaf0bb5f4e2cf2a7974448200d36854de 4.2s
=> => extracting sha256:700f3cd68da74eaa60fbf5bdbd028fe4e96c6ce3fc5fabc968785547b3b7373d 0.3s
=> => extracting sha256:3230e199415c0a9a350ca767c663d1074e306c84bd56ef31a296b4b455f8700f 0.7s
=> => extracting sha256:df03755c797fff28a10d05180264ac3bca8e9758ef912234965d3eab57df5404 0.0s
=> [web-test internal] load build context 0.1s
=> => transferring context: 3.23kB 0.0s
=> [web internal] load build context 0.1s
=> => transferring context: 2.86kB 0.0s
=> [web-test 2/7] WORKDIR /usr/src/app 0.3s
=> [web-test 3/8] RUN apt-get update && apt-get install -y curl libpq-dev python3-dev && apt-get install -y libsqlite3-0 graphviz-dev graphviz && apt-get clean 12.1s
=> [web 3/7] RUN apt-get update && apt-get install -y xvfb libpq-dev python3-dev graphviz-dev graphviz && apt-get clean 18.2s
=> [web-test 4/8] COPY requirements.txt dev-requirements.txt /usr/src/app/ 0.1s
=> [web-test 5/8] RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && . "$HOME/.cargo/env" && pip3 install --no-cache-dir -r requirements.txt && pip3 install --no-cache-dir -r dev-requirements.txt 83.3s
=> [web 4/7] COPY requirements.txt /usr/src/app/ 0.2s
=> [web 5/7] RUN pip3 install --no-cache-dir -r requirements.txt 40.4s
=> [web 6/7] COPY create_db.py test_data.py /usr/src/app/ 0.2s
=> [web 7/7] WORKDIR /usr/src/app/ 0.0s
=> [web] exporting to image 34.7s
=> => exporting layers 23.5s
=> => exporting manifest sha256:e1c555e68a7521b54f794781f4bd2b4379c7b422126817b1c1b6b6c37b020509 0.0s
=> => exporting config sha256:8b1d40ef255044bfe5fac6d02c1be6410096080350b6e7384e83fbbdce5b351c 0.0s
=> => exporting attestation manifest sha256:3c861056ceea408513cb02b0546a6b614a3eaebe30766f9bc4caf1cd66cb2a4c 0.0s
=> => exporting manifest list sha256:6a6ac90bc3d883092b64b612fbcdd8ed8efb92035ec2aa7d932043cbcfec8d8f 0.0s
=> => naming to docker.io/library/openoversight-web:latest 0.0s
=> => unpacking to docker.io/library/openoversight-web:latest 11.1s
=> [web] resolving provenance for metadata file 0.0s
=> [web-test 6/8] RUN playwright install --with-deps chromium 34.9s
=> [web-test 7/8] COPY create_db.py test_data.py /usr/src/app/ 0.1s
=> [web-test 8/8] WORKDIR /usr/src/app/ 0.0s
=> [web-test] exporting to image 89.5s
=> => exporting layers 60.9s
=> => exporting manifest sha256:9bde90eae35937c1611fe5894bdcb4ea4826e9515b18a4c16bd8eff93ae9f848 0.0s
=> => exporting config sha256:032ed32649caacefd6df564607854566f709fe04114ba80ba5060e22e0777762 0.0s
=> => exporting attestation manifest sha256:18edf3845917851ac886aba75e039eb97821038114105adfaf2587ca62628628 0.0s
=> => exporting manifest list sha256:f17709d6f9543797596523dadb68842f9449d3397bb32bc3b1a52edc3258099a 0.0s
=> => naming to docker.io/library/openoversight-web-test:latest 0.0s
=> => unpacking to docker.io/library/openoversight-web-test:latest 28.6s
=> [web-test] resolving provenance for metadata file 0.0s
[+] build 2/2
✔ Image openoversight-web-test Built 238.2s
✔ Image openoversight-web Built 238.2s
docker compose up -d
WARN[0000] The "APPROVE_REGISTRATIONS" variable is not set. Defaulting to a blank string.
[+] up 30/32
[+] up 40/40tgres:latest [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] Pulling 11.8s
✔ Image postgres:latest Pulled 11.8s
✔ fdfe2104fb23 Pull complete 1.1s
✔ 119d43eec815 Pull complete 4.1s
✔ 05c02d5e0a60 Pull complete 1.2s
✔ 7029853d8f47 Pull complete 1.1s
✔ 2cb1625cf212 Pull complete 7.2s
✔ d3b2038f0307 Pull complete 4.3s
✔ b5e23963a3cd Pull complete 1.3s
✔ ade980a94d87 Pull complete 4.4s
✔ dcc21a450f56 Pull complete 4.6s
✔ 617e7a31540f Pull complete 4.7s
✔ c1bb9e333b95 Pull complete 1.3s
✔ 97457a8dcb7d Pull complete 7.3s
✔ e086e98b1962 Pull complete 1.1s
✔ ef13937159d4 Download complete 0.1s
✔ aafeee648be4 Download complete 0.0s
✔ Image minio/minio Pulled 8.9s
✔ b83ce1c86227 Pull complete 2.4s
✔ 34013573f278 Pull complete 1.2s
✔ f94d28849fa3 Pull complete 2.6s
✔ 81260b173076 Pull complete 2.7s
✔ f9c0805c25ee Pull complete 5.3s
✔ 1008deaf6ec4 Pull complete 5.5s
✔ 71e9fc939447 Pull complete 1.2s
✔ c1bc68842c41 Pull complete 5.6s
✔ 0288b5a0d7e7 Pull complete 0.3s
✔ Image minio/mc Pulled 7.3s
✔ b7c1efd1d2b4 Pull complete 4.1s
✔ b83ce1c86227 Pull complete 2.4s
✔ 4a93952ab9ce Pull complete 1.0s
✔ b268f447c871 Pull complete 2.5s
✔ f29310fc4a8a Pull complete 1.2s
✔ 9404e0df6bd3 Pull complete 3.3s
✔ Network openoversight_default Created 0.0s
✔ Volume openoversight_postgres Created 0.0s
✔ Volume openoversight_minio Created 0.0s
✔ Container openoversight-postgres-1 Created 0.4s
✔ Container openoversight-minio-1 Created 0.4s
✔ Container openoversight-createbucket-1 Created 0.1s
✔ Container openoversight-web-1 Created 0.1s
✔ Container openoversight-web-test-1 Created 0.1s
Postgres is up
## Creating database
docker compose run --rm web python ./create_db.py
WARN[0000] The "APPROVE_REGISTRATIONS" variable is not set. Defaulting to a blank string.
WARN[0000] The "APPROVE_REGISTRATIONS" variable is not set. Defaulting to a blank string.
WARN[0000] No services to build
[+] 2/2t 2/22
✔ Container openoversight-minio-1 Running 0.0s
✔ Container openoversight-postgres-1 Running 0.0s
the input device is not a TTY
WARN[0000] No services to build
Container openoversight-web-run-a1cd7adde2f7 Creating
Container openoversight-web-run-a1cd7adde2f7 Created
[2026-01-19 11:11:56,301] INFO in email_client: Using email provider: SimulatedEmailProvider
/usr/local/lib/python3.11/site-packages/flask_limiter/extension.py:293: UserWarning: Using the in-memory storage for tracking rate limits as no storage was explicitly specified. This is not recommended for production use. See: https://flask-limiter.readthedocs.io#configuring-a-storage-backend for documentation about configuring the storage backend.
warnings.warn(
[2026-01-19 11:11:56,356] INFO in __init__: OpenOversight startup
[2026-01-19 11:11:56,423] INFO in __init__: OpenOversight startup
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3371, in _wrap_pool_connect
return fn()
^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 327, in connect
return _ConnectionFairy._checkout(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 894, in _checkout
fairy = _ConnectionRecord.checkout(pool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 493, in checkout
rec = pool._do_get()
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 145, in _do_get
with util.safe_reraise():
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
compat.raise_(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
raise exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 143, in _do_get
return self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 273, in _create_connection
return _ConnectionRecord(self)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 388, in __init__
self.__connect()
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 690, in __connect
with util.safe_reraise():
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
compat.raise_(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
raise exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 686, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 574, in connect
return dialect.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 598, in connect
return self.dbapi.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/psycopg2/__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "postgres" (172.18.0.3) and accepting
TCP/IP connections on port 5432?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/app/./create_db.py", line 9, in <module>
db.create_all()
File "/usr/local/lib/python3.11/site-packages/flask_sqlalchemy/extension.py", line 887, in create_all
self._call_for_binds(bind_key, "create_all")
File "/usr/local/lib/python3.11/site-packages/flask_sqlalchemy/extension.py", line 868, in _call_for_binds
getattr(metadata, op_name)(bind=engine)
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/sql/schema.py", line 4930, in create_all
bind._run_ddl_visitor(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3237, in _run_ddl_visitor
with self.begin() as conn:
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3153, in begin
conn = self.connect(close_with_result=close_with_result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3325, in connect
return self._connection_cls(self, close_with_result=close_with_result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 96, in __init__
else engine.raw_connection()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3404, in raw_connection
return self._wrap_pool_connect(self.pool.connect, _connection)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3374, in _wrap_pool_connect
Connection._handle_dbapi_exception_noconnection(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2208, in _handle_dbapi_exception_noconnection
util.raise_(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
raise exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3371, in _wrap_pool_connect
return fn()
^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 327, in connect
return _ConnectionFairy._checkout(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 894, in _checkout
fairy = _ConnectionRecord.checkout(pool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 493, in checkout
rec = pool._do_get()
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 145, in _do_get
with util.safe_reraise():
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
compat.raise_(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
raise exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 143, in _do_get
return self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 273, in _create_connection
return _ConnectionRecord(self)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 388, in __init__
self.__connect()
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 690, in __connect
with util.safe_reraise():
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
compat.raise_(
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/compat.py", line 211, in raise_
raise exception
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 686, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 574, in connect
return dialect.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 598, in connect
return self.dbapi.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/psycopg2/__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused
Is the server running on host "postgres" (172.18.0.3) and accepting
TCP/IP connections on port 5432?
(Background on this error at: https://sqlalche.me/e/14/e3q8)
make: *** [Makefile:29: create_db] Error 1
What am I doing wrong? And can the documentation be improved? I'm happy to do some PRs on improving the Developer Quick start, if that's a help?
Host machine is Linux Mint 22.2 (GNU/Linux 6.8.0-90-generic x86_64), and guest VM as mentioned is Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-164-generic x86_64).