Skip to content

Commit 33caed6

Browse files
feat: this commit introduces a docker-compose.yml file in the root directory to orchestrate the full comanda ecosystem for local development, provisioning shared infrastructure services and bounded contexts to enable end-to-end execution on a single machine
1 parent 79f9414 commit 33caed6

1 file changed

Lines changed: 107 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# this composition orchestrates the comanda ecosystem for local development.
2+
3+
# it provisions the required infrastructure services and bounded contexts
4+
# to enable end-to-end execution on a single machine.
5+
6+
services:
7+
comanda.infrastructure.mongo:
8+
container_name: "comanda.infrastructure.mongo"
9+
image: mongo:latest
10+
env_file:
11+
- .env
12+
ports:
13+
- "27017:27017"
14+
environment:
15+
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
16+
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
17+
volumes:
18+
- comanda.infrastructure.mongo:/data/db
19+
20+
comanda.infrastructure.federation:
21+
container_name: "comanda.infrastructure.federation"
22+
image: httpsrichardy/federation:latest
23+
env_file:
24+
- .env
25+
ports:
26+
- "5000:8080"
27+
depends_on:
28+
- comanda.infrastructure.mongo
29+
environment:
30+
Settings__Database__ConnectionString: ${COMANDA_MONGO_CONNECTIONSTRING}
31+
Settings__Database__DatabaseName: ${COMANDA_MONGO_DATABASENAME}
32+
Settings__Administration__Username: ${COMANDA_ADMIN_USERNAME}
33+
Settings__Administration__Password: ${COMANDA_ADMIN_PASSWORD}
34+
35+
comanda.infrastructure.seq:
36+
container_name: "comanda.infrastructure.seq"
37+
image: datalust/seq:latest
38+
restart: unless-stopped
39+
ports:
40+
- "5341:80"
41+
- "5342:5341"
42+
environment:
43+
ACCEPT_EULA: "Y"
44+
SEQ_FIRSTRUN_ADMINPASSWORD: ${SEQ_FIRSTRUN_ADMINPASSWORD}
45+
volumes:
46+
- comanda.infrastructure.seq:/data
47+
48+
comanda.boundaries.stores:
49+
container_name: "comanda.boundaries.stores"
50+
build:
51+
context: ./Boundaries/Comanda.Stores/
52+
dockerfile: Dockerfile
53+
env_file:
54+
- .env
55+
ports:
56+
- "5005:8080"
57+
depends_on:
58+
- comanda.infrastructure.federation
59+
- comanda.infrastructure.seq
60+
environment:
61+
# database settings
62+
Settings__Database__ConnectionString: ${COMANDA_MONGO_CONNECTIONSTRING}
63+
Settings__Database__DatabaseName: ${COMANDA_MONGO_DATABASENAME}
64+
65+
# federation settings
66+
Settings__Federation__BaseUrl: ${COMANDA_FEDERATION_BASEURL}
67+
Settings__Federation__Realm: ${COMANDA_FEDERATION_REALM}
68+
Settings__Federation__ClientId: ${COMANDA_FEDERATION_CLIENTID}
69+
Settings__Federation__ClientSecret: ${COMANDA_FEDERATION_CLIENTSECRET}
70+
71+
# observability settings
72+
Settings__Observability__SeqServerUrl: ${SEQ_SERVERURL}
73+
Settings__Observability__SentryDsn: ${SENTRY_DSN}
74+
75+
comanda.boundaries.subscriptions:
76+
container_name: "comanda.boundaries.subscriptions"
77+
build:
78+
context: ./Boundaries/Comanda.Subscriptions/
79+
dockerfile: Dockerfile
80+
env_file:
81+
- .env
82+
ports:
83+
- "5010:8080"
84+
depends_on:
85+
- comanda.infrastructure.federation
86+
- comanda.infrastructure.seq
87+
environment:
88+
# database settings
89+
Settings__Database__ConnectionString: ${COMANDA_MONGO_CONNECTIONSTRING}
90+
Settings__Database__DatabaseName: ${COMANDA_MONGO_DATABASENAME}
91+
92+
# federation settings
93+
Settings__Federation__BaseUrl: ${COMANDA_FEDERATION_BASEURL}
94+
Settings__Federation__Realm: ${COMANDA_FEDERATION_REALM}
95+
Settings__Federation__ClientId: ${COMANDA_FEDERATION_CLIENTID}
96+
Settings__Federation__ClientSecret: ${COMANDA_FEDERATION_CLIENTSECRET}
97+
98+
# stripe settings
99+
Settings__Stripe__Secret: ${COMANDA_STRIPE_SECRET}
100+
101+
# observability settings
102+
Settings__Observability__SeqServerUrl: ${SEQ_SERVERURL}
103+
Settings__Observability__SentryDsn: ${SENTRY_DSN}
104+
105+
volumes:
106+
comanda.infrastructure.mongo:
107+
comanda.infrastructure.seq:

0 commit comments

Comments
 (0)