我有多个都依赖于通用基础结构的存储库。因此,有一个docker-compose.infrastructure.yml
可以旋转所有这些依赖关系。
示例:
version: '3.5'
services:
seq:
image: datalust/seq:latest
container_name: seq
ports:
- "5341:80"
environment:
- ACCEPT_EULA=Y
networks:
- my-network
couchbase:
build:
context: ./docker-compose/couchbase
dockerfile: Dockerfile
container_name: couchbase
ports:
- 8091:8091
- 8092:8092
- 8093:8093
- 11210:11210
environment:
- USERNAME=**
- PASSWORD=**
- BUCKET=blah
networks:
- my-network
localstack:
build:
context: ./docker-compose/localstack
dockerfile: Dockerfile
container_name: localstack
environment:
- SERVICES=s3,sqs
- HOSTNAME=localstack
- DEFAULT_REGION=eu-west-2
ports:
- "4572:4572"
- "4576:4576"
- "8080:8080"
networks:
- my-network
volumes:
- ./docker-compose/localstack/provision.sh:/docker-entrypoint-initaws.d/provision.sh
eventstore:
image: eventstore/eventstore:release-5.0.0
container_name: 3ds2-eventstore
environment:
- EVENTSTORE_START_STANDARD_PROJECTIONS=TRUE
- EVENTSTORE_RUN_PROJECTIONS=All
ports:
- "2113:2113"
- "1113:1113"
networks:
- my-network
networks:
my-network:
name: my-network
问题在于每个仓库都包含相同的docker-compose.infrastructure.yml
,如果基础架构发生了变化,那么这意味着我们必须对所有其他仓库进行相同的更改。
我试图通过将docker-compose.infrastructure.yml
托管在某个地方,然后获取所有其他存储库以将其拉下并运行,来查看是否有一种将javascript:history.back()
集中的方法。
据我了解,它不能是图像,因为那样会丢失环境和端口设置。
如果有一种优雅的方法来集中所有其他存储库的基础架构构建,请让我知道如何执行此操作。