Move tavolo-app under packages/ for a uniform monorepo layout
CI / Build and push docker image (push) Successful in 2m29s
CI / Build and push docker image (push) Successful in 2m29s
Relocate the composition root (app, config, static, logging_config, aerich_config) from server/src/tavolo/ to packages/tavolo-app/src/tavolo/, with its own pyproject.toml and README like the sibling distributions. Module paths and the granian entrypoint are unchanged. server/pyproject.toml remains as a tooling shim ([tool.aerich] next to ./migrations, [tool.mypy] for runs from server/); the Dockerfile installs all three distributions from ./packages. Verified: all suites green, mypy clean per package, aerich resolves the moved config identically, wheel builds.
This commit is contained in:
+8
-6
@@ -55,14 +55,16 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
&& /opt/venv/bin/pip install --upgrade pip \
|
||||
&& /opt/venv/bin/pip install -r requirements.txt
|
||||
|
||||
COPY server/pyproject.toml server/README.md ./
|
||||
COPY server/src/ ./src/
|
||||
# Sibling distributions, installed from the local tree (PEP 420 namespace
|
||||
# packages sharing the `tavolo` namespace with the app above). --no-deps:
|
||||
# every third-party dependency is already pinned in requirements.txt.
|
||||
# The three sibling distributions, installed from the local tree (PEP 420
|
||||
# namespace packages sharing the `tavolo` namespace). --no-deps: every
|
||||
# third-party dependency is already pinned in requirements.txt.
|
||||
COPY server/packages/ ./packages/
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
/opt/venv/bin/pip install --no-deps ./packages/tavolo-platform ./packages/tavolo-scopone .
|
||||
/opt/venv/bin/pip install --no-deps ./packages/tavolo-platform ./packages/tavolo-scopone ./packages/tavolo-app
|
||||
# server/pyproject.toml only carries the [tool.aerich] section (the
|
||||
# db-migrate compose service runs `aerich upgrade` with working_dir=/app,
|
||||
# next to ./migrations).
|
||||
COPY server/pyproject.toml ./
|
||||
# aerich migration files are a release artifact: the db-migrate compose
|
||||
# service runs `aerich upgrade` from this image before the app starts.
|
||||
COPY server/migrations/ ./migrations/
|
||||
|
||||
Reference in New Issue
Block a user