All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m5s
Combines shared, blog, market, cart, events, federation, and account into a single repository. Eliminates submodule sync, sibling model copying at build time, and per-app CI orchestration. Changes: - Remove per-app .git, .gitmodules, .gitea, submodule shared/ dirs - Remove stale sibling model copies from each app - Update all 6 Dockerfiles for monorepo build context (root = .) - Add build directives to docker-compose.yml - Add single .gitea/workflows/ci.yml with change detection - Add .dockerignore for monorepo build context - Create __init__.py for federation and account (cross-app imports)
29 lines
1.1 KiB
Python
29 lines
1.1 KiB
Python
"""Blog app service registration."""
|
|
from __future__ import annotations
|
|
|
|
|
|
def register_domain_services() -> None:
|
|
"""Register services for the blog app.
|
|
|
|
Blog owns: Post, Tag, Author, PostAuthor, PostTag, PostLike.
|
|
Standard deployment registers all 4 services as real DB impls
|
|
(shared DB). For composable deployments, swap non-owned services
|
|
with stubs from shared.services.stubs.
|
|
"""
|
|
from shared.services.registry import services
|
|
from shared.services.blog_impl import SqlBlogService
|
|
from shared.services.calendar_impl import SqlCalendarService
|
|
from shared.services.market_impl import SqlMarketService
|
|
from shared.services.cart_impl import SqlCartService
|
|
|
|
services.blog = SqlBlogService()
|
|
if not services.has("calendar"):
|
|
services.calendar = SqlCalendarService()
|
|
if not services.has("market"):
|
|
services.market = SqlMarketService()
|
|
if not services.has("cart"):
|
|
services.cart = SqlCartService()
|
|
if not services.has("federation"):
|
|
from shared.services.federation_impl import SqlFederationService
|
|
services.federation = SqlFederationService()
|