estebanx64 / python-docker-example

3 stars 19 forks source link

Getting error while deploying it #2

Open pdwytr opened 1 month ago

pdwytr commented 1 month ago
+] Running 1/0                                                                               
 ✔ Container python-docker-dev-example-server-1  Recreated                               0.0s 
Attaching to server-1
server-1  | Traceback (most recent call last):
server-1  |   File "/usr/local/bin/uvicorn", line 8, in <module>
server-1  |     sys.exit(main())
server-1  |              ^^^^^^
server-1  |   File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
server-1  |     return self.main(*args, **kwargs)
server-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
server-1  |   File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
server-1  |     rv = self.invoke(ctx)
server-1  |          ^^^^^^^^^^^^^^^^
server-1  |   File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
server-1  |     return ctx.invoke(self.callback, **ctx.params)
server-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
server-1  |   File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
server-1  |     return __callback(*args, **kwargs)
server-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
server-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 410, in main
server-1  |     run(
server-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 577, in run
server-1  |     server.run()
server-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run
server-1  |     return asyncio.run(self.serve(sockets=sockets))
server-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
server-1  |   File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
server-1  |     return runner.run(main)
server-1  |            ^^^^^^^^^^^^^^^^
server-1  |   File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
server-1  |     return self._loop.run_until_complete(task)
server-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
server-1  |   File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
server-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve
server-1  |     await self._serve(sockets)
server-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve
server-1  |     config.load()
server-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 434, in load
server-1  |     self.loaded_app = import_from_string(self.app)
server-1  |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
server-1  |   File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string
server-1  |     module = importlib.import_module(module_str)
server-1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
server-1  |   File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
server-1  |     return _bootstrap._gcd_import(name[level:], package, level)
server-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
server-1  |   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
server-1  |   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
server-1  |   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
server-1  |   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
server-1  |   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
server-1  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
server-1  |   File "/app/app.py", line 3, in <module>
server-1  |     from config import settings
server-1  |   File "/app/config.py", line 53, in <module>
server-1  |     settings = Settings()
server-1  |                ^^^^^^^^^^
server-1  |   File "/usr/local/lib/python3.11/site-packages/pydantic_settings/main.py", line 140, in __init__
server-1  |     super().__init__(
server-1  |   File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 193, in __init__
server-1  |     self.__pydantic_validator__.validate_python(data, self_instance=self)
server-1  | pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings
server-1  |   Value error, At least one of POSTGRES_PASSWORD_FILE and POSTGRES_PASSWORD must be set. [type=value_error, input_value={}, input_type=dict]
server-1  |     For further information visit https://errors.pydantic.dev/2.8/v/value_error
server-1 exited with code 1
study@ip-192-168-1-5 python-docker-dev-example % 
pdwytr commented 1 month ago

So did make the password.txt file I still see the same error password.txt at /Users/study/Documents/Projects/python-docker-dev-example/db