Split cart into 4 microservices: relations, likes, orders, page-config→blog
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled

Phase 1 - Relations service (internal): owns ContainerRelation, exposes
get-children data + attach/detach-child actions. Retargeted events, blog,
market callers from cart to relations.

Phase 2 - Likes service (internal): unified Like model replaces ProductLike
and PostLike with generic target_type/target_slug/target_id. Exposes
is-liked, liked-slugs, liked-ids data + toggle action.

Phase 3 - PageConfig → blog: moved ownership to blog with direct DB queries,
removed proxy endpoints from cart.

Phase 4 - Orders service (public): owns Order/OrderItem + SumUp checkout
flow. Cart checkout now delegates to orders via create-order action.
Webhook/return routes and reconciliation moved to orders.

Phase 5 - Infrastructure: docker-compose, deploy.sh, Dockerfiles updated
for all 3 new services. Added orders_url helper and factory model imports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 09:03:33 +00:00
parent 76a9436ea1
commit fa431ee13e
125 changed files with 3459 additions and 860 deletions

View File

@@ -32,6 +32,9 @@ x-app-env: &app-env
APP_URL_EVENTS: https://events.rose-ash.com
APP_URL_FEDERATION: https://federation.rose-ash.com
APP_URL_ACCOUNT: https://account.rose-ash.com
APP_URL_ORDERS: https://orders.rose-ash.com
APP_URL_RELATIONS: http://relations:8000
APP_URL_LIKES: http://likes:8000
APP_URL_ARTDAG: https://celery-artdag.rose-ash.com
APP_URL_ARTDAG_L2: https://artdag.rose-ash.com
INTERNAL_URL_BLOG: http://blog:8000
@@ -40,6 +43,9 @@ x-app-env: &app-env
INTERNAL_URL_EVENTS: http://events:8000
INTERNAL_URL_FEDERATION: http://federation:8000
INTERNAL_URL_ACCOUNT: http://account:8000
INTERNAL_URL_ORDERS: http://orders:8000
INTERNAL_URL_RELATIONS: http://relations:8000
INTERNAL_URL_LIKES: http://likes:8000
INTERNAL_URL_ARTDAG: http://l1-server:8100
AP_DOMAIN: federation.rose-ash.com
AP_DOMAIN_BLOG: blog.rose-ash.com
@@ -147,6 +153,54 @@ services:
RUN_MIGRATIONS: "true"
WORKERS: "1"
relations:
<<: *app-common
image: registry.rose-ash.com:5000/relations:latest
build:
context: .
dockerfile: relations/Dockerfile
environment:
<<: *app-env
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_relations
ALEMBIC_DATABASE_URL: postgresql+psycopg://postgres:change-me@db:5432/db_relations
REDIS_URL: redis://redis:6379/6
DATABASE_HOST: db
DATABASE_PORT: "5432"
RUN_MIGRATIONS: "true"
WORKERS: "1"
likes:
<<: *app-common
image: registry.rose-ash.com:5000/likes:latest
build:
context: .
dockerfile: likes/Dockerfile
environment:
<<: *app-env
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_likes
ALEMBIC_DATABASE_URL: postgresql+psycopg://postgres:change-me@db:5432/db_likes
REDIS_URL: redis://redis:6379/7
DATABASE_HOST: db
DATABASE_PORT: "5432"
RUN_MIGRATIONS: "true"
WORKERS: "1"
orders:
<<: *app-common
image: registry.rose-ash.com:5000/orders:latest
build:
context: .
dockerfile: orders/Dockerfile
environment:
<<: *app-env
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_orders
ALEMBIC_DATABASE_URL: postgresql+psycopg://postgres:change-me@db:5432/db_orders
REDIS_URL: redis://redis:6379/8
DATABASE_HOST: db
DATABASE_PORT: "5432"
RUN_MIGRATIONS: "true"
WORKERS: "1"
db:
image: postgres:16
environment: