stac-utils / stac-fastapi-sqlalchemy

PostgreSQL backend for stac-fastapi using SQLAlchemy
MIT License
9 stars 10 forks source link

docker compose not running #12

Closed keul closed 1 year ago

keul commented 1 year ago

Checking out the main branch of the repo and just running docker compose up:

stac-db                               | 2023-04-17 16:03:45.904 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
stac-db                               | 2023-04-17 16:03:45.904 UTC [1] LOG:  listening on IPv6 address "::", port 5432
stac-db                               | 2023-04-17 16:03:45.909 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
stac-db                               | 2023-04-17 16:03:45.921 UTC [70] LOG:  database system was shut down at 2023-04-17 16:03:45 UTC
stac-db                               | 2023-04-17 16:03:45.936 UTC [1] LOG:  database system is ready to accept connections
stac-fastapi-sqlalchemy               | wait-for-it.sh: database:5432 is available after 7 seconds
stac-fastapi-sqlalchemy               | Traceback (most recent call last):
stac-fastapi-sqlalchemy               |   File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
stac-fastapi-sqlalchemy               |     return _run_code(code, main_globals, None,
stac-fastapi-sqlalchemy               |   File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
stac-fastapi-sqlalchemy               |     exec(code, run_globals)
stac-fastapi-sqlalchemy               |   File "/app/stac_fastapi/sqlalchemy/app.py", line 4, in <module>
stac-fastapi-sqlalchemy               |     from stac_fastapi.api.app import StacApi
stac-fastapi-sqlalchemy               | ModuleNotFoundError: No module named 'stac_fastapi.api'
gadomski commented 1 year ago

I cannot reproduce:

$ stac-fastapi-sqlalchemy git:(main) git pull 
Already up to date.
$ stac-fastapi-sqlalchemy git:(main) docker-compose up
[+] Running 4/4
 ⠿ Network stac-fastapi-network                    Created                                                                                                                                                                                                                                                     0.1s
 ⠿ Container stac-db                               Created                                                                                                                                                                                                                                                     0.1s
 ⠿ Container stac-fastapi-sqlalchemy               Created                                                                                                                                                                                                                                                     0.2s
 ⠿ Container stac-fastapi-sqlalchemy-loadjoplin-1  Created                                                                                                                                                                                                                                                     0.1s
-- 8< --
stac-fastapi-sqlalchemy-loadjoplin-1 exited with code 0

Edit: Did you docker-compose build before running docker-compose up?

keul commented 1 year ago

@gadomski in theory I did, but after a docker prune and retry from stratch… it worked 🤷‍♂️.

Sorry for bothering!

gadomski commented 1 year ago

No problem!