ecotone-examples/php-ddd-cqrs-event-sourcing-ecotone

dev-master 2022-02-12 08:41 UTC

This package is auto-updated.

Last update: 2022-03-12 08:55:16 UTC


README

alt text

应用程序展示了如何使用PHP轻松构建复杂系统。示例使用了基于Prooph、在Symfony中使用Ecotone框架支持的CQRS DDD和事件源。

祝您玩得开心 :)

使用docker-compose运行

make start  # Starts the containers. `make docker_up_detached` would run it in detached (-d) mode.
make help   # To see the available usage command
make [tab]  # For autocomplete
make sh     # to login to the bash of the app container
# Inside the container
console [tab] # To get all the Symfony's available commands including Ecotone ones
exit
# Outside the container
make db_sql # To access the PostgreSQL command CLI on the database container
make stop   # To stop the containers and their networks (keep their volumes and images)
make reset  # To remove the containers, their networks, their volumes for then restarting from scratch
make clean  # To remove everything from Docker and let your computer as if you never used this repo
  • 应用程序在localhost:3000可用
  • 由于读取模型是异步更新的,执行操作后可能需要刷新才能看到更改。

在本地Kubernetes上运行

为了轻松设置本地集群,请遵循此处说明。然后安装skaffold以自动将代码同步到Kubernetes。您将能够修改代码,并在同一部署上即时看到更改。

Add to your hosts file (/etc/hosts) ecotone.local.dev for your docker ip address (127.0.0.1 for linux)
Run `skaffold dev --tail`
Enter `https://ecotone.local.dev` and enjoy the application :)

如需了解更多关于所有这些如何协同工作,请访问博客文章

Laravel和Ecotone Lite的潜在集成

应用程序是用Symfony编写的,但是Ecotone可以与Laravel集成,并且可以独立运行,无需任何额外的框架(Ecotone Lite)。这里编写的所有代码,在用LaravelEcotone Lite运行时将完全以相同的方式工作。