litestar-pg-redis-docker
litestar-pg-redis-docker copied to clipboard
Bug: Cannot run the application
Description
I followed the instructions in the readme, but I got an error when running docker compose run --rm app alembic upgrade head
Steps to reproduce
1. Clone repo
2. `cp .env.example .env`
3. `docker compose build`
4. `docker compose run --rm app alembic upgrade head` ← error happens here
Logs
docker compose up --build
[+] Building 11.6s (12/17)
=> [app internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 1.46kB 0.0s
=> [app internal] load .dockerignore 0.1s
=> => transferring context: 104B 0.0s
=> [app] resolve image config for docker.io/docker/dockerfile:1.4 1.9s
=> CACHED [app] docker-image://docker.io/docker/dockerfile:1.4@sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94c4e84ced81e24 0.0s
=> [app internal] load metadata for docker.io/library/python:3.11-slim 2.0s
=> [app internal] load build context 0.0s
=> => transferring context: 1.37kB 0.0s
=> [app base 1/3] FROM docker.io/library/python:3.11-slim@sha256:364ee1a9e029fb7b60102ae56ff52153ccc929ceab9aa387402fe738432d2 0.0s
=> CACHED [app base 2/3] RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends curl g 0.0s
=> CACHED [app base 3/3] RUN curl -sSL https://install.python-poetry.org | python3 - && poetry config virtualenvs.create f 0.0s
=> CACHED [app base-prod 1/3] WORKDIR /app 0.0s
=> CACHED [app base-prod 2/3] COPY pyproject.toml poetry.lock ./ 0.0s
=> ERROR [app base-prod 3/3] RUN --mount=type=cache,target=/cache/poetry poetry install --no-root --only main 7.1s
------
> [app base-prod 3/3] RUN --mount=type=cache,target=/cache/poetry poetry install --no-root --only main:
#0 1.057 Skipping virtualenv creation, as specified in config file.
#0 1.998 Installing dependencies from lock file
#0 2.285 Warning: poetry.lock is not consistent with pyproject.toml. You may be getting improper dependencies. Run `poetry lock [--no-update]` to fix it.
#0 2.554
#0 2.554 Package operations: 46 installs, 0 updates, 0 removals
#0 2.554
#0 2.556 • Installing idna (3.4)
#0 2.557 • Installing mdurl (0.1.2)
#0 2.557 • Installing six (1.16.0)
#0 2.558 • Installing sniffio (1.3.0)
#0 3.121 • Installing anyio (3.7.0)
#0 3.123 • Installing certifi (2023.5.7)
#0 3.124 • Installing markdown-it-py (3.0.0)
#0 3.125 • Installing h11 (0.14.0)
#0 3.127 • Installing pygments (2.15.1)
#0 3.128 • Installing python-dateutil (2.8.2)
#0 3.457 • Installing async-timeout (4.0.2)
#0 3.459 • Installing click (8.1.3)
#0 3.461 • Installing faker (18.11.2)
#0 3.462 • Installing editorconfig (0.12.3)
#0 3.465 • Installing httpcore (0.17.2)
#0 3.466 • Installing greenlet (2.0.2)
#0 3.468 • Installing markupsafe (2.1.3)
#0 3.469 • Installing httptools (0.5.0)
#0 3.476 • Installing hiredis (2.2.3)
#0 3.481 • Installing pyyaml (5.4.1)
#0 3.488 • Installing python-dotenv (1.0.0)
#0 3.493 • Installing rich (13.4.2)
#0 3.497 • Installing watchfiles (0.19.0)
#0 3.501 • Installing typing-extensions (4.7.1)
#0 3.502 • Installing websockets (11.0.3)
#0 3.510 • Installing uvloop (0.17.0)
#0 6.803
#0 6.803 ChefBuildError
#0 6.803
#0 6.803 Backend subprocess exited when trying to invoke get_requires_for_build_wheel
#0 6.803
#0 6.803 /tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
#0 6.803 !!
#0 6.803
#0 6.803 ********************************************************************************
#0 6.803 The license_file parameter is deprecated, use license_files instead.
#0 6.803
#0 6.803 By 2023-Oct-30, you need to update your project and remove deprecated calls
#0 6.803 or your builds will no longer be supported.
#0 6.803
#0 6.803 See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
#0 6.803 ********************************************************************************
#0 6.803
#0 6.803 !!
#0 6.803 parsed = self.parsers.get(option_name, lambda x: x)(value)
#0 6.803 running egg_info
#0 6.803 writing lib3/PyYAML.egg-info/PKG-INFO
#0 6.803 writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
#0 6.803 writing top-level names to lib3/PyYAML.egg-info/top_level.txt
#0 6.803 Traceback (most recent call last):
#0 6.803 File "/opt/poetry/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
#0 6.803 main()
#0 6.803 File "/opt/poetry/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
#0 6.803 json_out['return_val'] = hook(**hook_input['kwargs'])
#0 6.803 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 6.803 File "/opt/poetry/venv/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
#0 6.803 return hook(config_settings)
#0 6.803 ^^^^^^^^^^^^^^^^^^^^^
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
#0 6.803 return self._get_build_requires(config_settings, requirements=['wheel'])
#0 6.803 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
#0 6.803 self.run_setup()
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
#0 6.803 exec(code, locals())
#0 6.803 File "<string>", line 271, in <module>
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
#0 6.803 return distutils.core.setup(**attrs)
#0 6.803 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
#0 6.803 return run_commands(dist)
#0 6.803 ^^^^^^^^^^^^^^^^^^
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
#0 6.803 dist.run_commands()
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
#0 6.803 self.run_command(cmd)
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command
#0 6.803 super().run_command(command)
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
#0 6.803 cmd_obj.run()
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 314, in run
#0 6.803 self.find_sources()
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 322, in find_sources
#0 6.803 mm.run()
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 551, in run
#0 6.803 self.add_defaults()
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 589, in add_defaults
#0 6.803 sdist.add_defaults(self)
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/command/sdist.py", line 104, in add_defaults
#0 6.803 super().add_defaults()
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
#0 6.803 self._add_defaults_ext()
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 336, in _add_defaults_ext
#0 6.803 self.filelist.extend(build_ext.get_source_files())
#0 6.803 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
#0 6.803 File "<string>", line 201, in get_source_files
#0 6.803 File "/tmp/tmpp543mpod/.venv/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
#0 6.803 raise AttributeError(attr)
#0 6.803 AttributeError: cython_sources
#0 6.803
#0 6.803
#0 6.803 at /opt/poetry/venv/lib/python3.11/site-packages/poetry/installation/chef.py:152 in _prepare
#0 6.818 148│
#0 6.818 149│ error = ChefBuildError("\n\n".join(message_parts))
#0 6.818 150│
#0 6.819 151│ if error is not None:
#0 6.820 → 152│ raise error from None
#0 6.820 153│
#0 6.821 154│ return path
#0 6.822 155│
#0 6.822 156│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
#0 6.823
#0 6.823 Note: This error originates from the build backend, and is likely not a problem with poetry but with pyyaml (5.4.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "pyyaml (==5.4.1) ; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0""'.
#0 6.823
------
failed to solve: process "/bin/sh -c poetry install --no-root --only main" did not complete successfully: exit code: 1
Litestar Version
2.0.0beta2
Platform
- [ ] Linux
- [ ] Mac
- [X] Windows
- [ ] Other (Please specify in the description above)