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>
289 lines
8.2 KiB
YAML
289 lines
8.2 KiB
YAML
x-app-common: &app-common
|
|
networks:
|
|
appnet:
|
|
externalnet:
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- node.labels.gpu != true
|
|
volumes:
|
|
- /root/rose-ash/_config/app-config.yaml:/app/config/app-config.yaml:ro
|
|
|
|
x-app-env: &app-env
|
|
DATABASE_URL_ACCOUNT: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_account
|
|
DATABASE_URL_FEDERATION: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_federation
|
|
SMTP_HOST: ${SMTP_HOST}
|
|
SMTP_PORT: ${SMTP_PORT}
|
|
MAIL_FROM: ${MAIL_FROM}
|
|
SMTP_USER: ${SMTP_USER}
|
|
SMTP_PASS: ${SMTP_PASS}
|
|
GHOST_API_URL: ${GHOST_API_URL}
|
|
GHOST_ADMIN_API_URL: ${GHOST_ADMIN_API_URL}
|
|
GHOST_PUBLIC_URL: ${GHOST_PUBLIC_URL}
|
|
GHOST_CONTENT_API_KEY: ${GHOST_CONTENT_API_KEY}
|
|
GHOST_WEBHOOK_SECRET: ${GHOST_WEBHOOK_SECRET}
|
|
GHOST_ADMIN_API_KEY: ${GHOST_ADMIN_API_KEY}
|
|
REDIS_AUTH_URL: redis://redis-auth:6379/0
|
|
SECRET_KEY: ${SECRET_KEY}
|
|
SUMUP_API_KEY: ${SUMUP_API_KEY}
|
|
APP_URL_BLOG: https://blog.rose-ash.com
|
|
APP_URL_MARKET: https://market.rose-ash.com
|
|
APP_URL_CART: https://cart.rose-ash.com
|
|
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
|
|
INTERNAL_URL_MARKET: http://market:8000
|
|
INTERNAL_URL_CART: http://cart:8000
|
|
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
|
|
AP_DOMAIN_MARKET: market.rose-ash.com
|
|
AP_DOMAIN_EVENTS: events.rose-ash.com
|
|
EXTERNAL_INBOXES: "artdag|https://celery-artdag.rose-ash.com/inbox"
|
|
|
|
services:
|
|
blog:
|
|
<<: *app-common
|
|
image: registry.rose-ash.com:5000/blog:latest
|
|
build:
|
|
context: .
|
|
dockerfile: blog/Dockerfile
|
|
environment:
|
|
<<: *app-env
|
|
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_blog
|
|
ALEMBIC_DATABASE_URL: postgresql+psycopg://postgres:change-me@db:5432/db_blog
|
|
REDIS_URL: redis://redis:6379/0
|
|
DATABASE_HOST: db
|
|
DATABASE_PORT: "5432"
|
|
RUN_MIGRATIONS: "true"
|
|
WORKERS: "1"
|
|
|
|
market:
|
|
<<: *app-common
|
|
image: registry.rose-ash.com:5000/market:latest
|
|
build:
|
|
context: .
|
|
dockerfile: market/Dockerfile
|
|
volumes:
|
|
- /root/rose-ash/_config/app-config.yaml:/app/config/app-config.yaml:ro
|
|
- /root/rose-ash/_snapshot:/app/_snapshot
|
|
environment:
|
|
<<: *app-env
|
|
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_market
|
|
ALEMBIC_DATABASE_URL: postgresql+psycopg://postgres:change-me@db:5432/db_market
|
|
REDIS_URL: redis://redis:6379/1
|
|
DATABASE_HOST: db
|
|
DATABASE_PORT: "5432"
|
|
RUN_MIGRATIONS: "true"
|
|
WORKERS: "1"
|
|
|
|
cart:
|
|
<<: *app-common
|
|
image: registry.rose-ash.com:5000/cart:latest
|
|
build:
|
|
context: .
|
|
dockerfile: cart/Dockerfile
|
|
environment:
|
|
<<: *app-env
|
|
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_cart
|
|
ALEMBIC_DATABASE_URL: postgresql+psycopg://postgres:change-me@db:5432/db_cart
|
|
REDIS_URL: redis://redis:6379/2
|
|
DATABASE_HOST: db
|
|
DATABASE_PORT: "5432"
|
|
RUN_MIGRATIONS: "true"
|
|
WORKERS: "1"
|
|
|
|
events:
|
|
<<: *app-common
|
|
image: registry.rose-ash.com:5000/events:latest
|
|
build:
|
|
context: .
|
|
dockerfile: events/Dockerfile
|
|
environment:
|
|
<<: *app-env
|
|
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_events
|
|
ALEMBIC_DATABASE_URL: postgresql+psycopg://postgres:change-me@db:5432/db_events
|
|
REDIS_URL: redis://redis:6379/3
|
|
DATABASE_HOST: db
|
|
DATABASE_PORT: "5432"
|
|
RUN_MIGRATIONS: "true"
|
|
WORKERS: "1"
|
|
|
|
federation:
|
|
<<: *app-common
|
|
image: registry.rose-ash.com:5000/federation:latest
|
|
build:
|
|
context: .
|
|
dockerfile: federation/Dockerfile
|
|
environment:
|
|
<<: *app-env
|
|
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_federation
|
|
ALEMBIC_DATABASE_URL: postgresql+psycopg://postgres:change-me@db:5432/db_federation
|
|
REDIS_URL: redis://redis:6379/4
|
|
DATABASE_HOST: db
|
|
DATABASE_PORT: "5432"
|
|
RUN_MIGRATIONS: "true"
|
|
WORKERS: "1"
|
|
|
|
account:
|
|
<<: *app-common
|
|
image: registry.rose-ash.com:5000/account:latest
|
|
build:
|
|
context: .
|
|
dockerfile: account/Dockerfile
|
|
environment:
|
|
<<: *app-env
|
|
DATABASE_URL: postgresql+asyncpg://postgres:change-me@pgbouncer:5432/db_account
|
|
ALEMBIC_DATABASE_URL: postgresql+psycopg://postgres:change-me@db:5432/db_account
|
|
REDIS_URL: redis://redis:6379/5
|
|
DATABASE_HOST: db
|
|
DATABASE_PORT: "5432"
|
|
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:
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me}
|
|
POSTGRES_DB: ${POSTGRES_DB:-appdb}
|
|
volumes:
|
|
- db_data_1:/var/lib/postgresql/data
|
|
networks:
|
|
appnet:
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- node.labels.gpu != true
|
|
|
|
pgbouncer:
|
|
image: edoburu/pgbouncer:latest
|
|
environment:
|
|
DB_HOST: db
|
|
DB_PORT: "5432"
|
|
DB_USER: ${POSTGRES_USER:-postgres}
|
|
DB_PASSWORD: ${POSTGRES_PASSWORD:-change-me}
|
|
POOL_MODE: transaction
|
|
DEFAULT_POOL_SIZE: "20"
|
|
MAX_CLIENT_CONN: "300"
|
|
MIN_POOL_SIZE: "5"
|
|
AUTH_TYPE: plain
|
|
networks:
|
|
appnet:
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- node.labels.gpu != true
|
|
|
|
adminer:
|
|
image: adminer
|
|
networks:
|
|
appnet:
|
|
externalnet:
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- node.labels.gpu != true
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: redis
|
|
volumes:
|
|
- redis_data:/data
|
|
networks:
|
|
appnet:
|
|
command:
|
|
redis-server
|
|
--maxmemory 1gb
|
|
--maxmemory-policy allkeys-lru
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- node.labels.gpu != true
|
|
|
|
redis-auth:
|
|
image: redis:7-alpine
|
|
volumes:
|
|
- redis_auth_data:/data
|
|
networks:
|
|
appnet:
|
|
command:
|
|
redis-server
|
|
--maxmemory 64mb
|
|
--maxmemory-policy noeviction
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- node.labels.gpu != true
|
|
|
|
volumes:
|
|
db_data_1:
|
|
redis_data:
|
|
redis_auth_data:
|
|
networks:
|
|
appnet:
|
|
driver: overlay
|
|
externalnet:
|
|
driver: overlay
|
|
external: true
|