-
Notifications
You must be signed in to change notification settings - Fork 38
/
docker-compose.infrastructure.yaml
108 lines (98 loc) 路 3.22 KB
/
docker-compose.infrastructure.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
version: "3.8"
name: ecommerce-modular-monolith
services:
#######################################################
# rabbitmq
#######################################################
rabbitmq:
image: rabbitmq:management
container_name: rabbitmq
restart: on-failure
ports:
- ${RABBITMQ_HOST_PORT:-5672}:${RABBITMQ_PORT:-5672}
- ${RABBITMQ_HOST_API_PORT:-15672}:${RABBITMQ_API_PORT:-15672}
# volumes:
# - rabbitmq:/var/lib/rabbitmq
networks:
- ecommerce-modular
#######################################################
# mongo
#######################################################
mongo:
image: mongo
container_name: mongo
restart: on-failure
# https://docs.docker.com/compose/environment-variables/env-file/#parameter-expansion
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USER:-admin}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASS:-admin}
ports:
- ${MONGO_HOST_PORT:-27017}:${MONGO_PORT:-27017}
networks:
- ecommerce-modular
#######################################################
# postgres
#######################################################
postgres:
image: postgres:latest
container_name: postgres
restart: on-failure
ports:
- ${POSTGRES_HOST_PORT:-5432}:${POSTGRES_PORT:-5432}
#https://docs.docker.com/compose/environment-variables/env-file/#parameter-expansion
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
networks:
- ecommerce-modular
#######################################################
# eventstore-db
#######################################################
# https://developers.eventstore.com/server/v21.10/installation.html#insecure-single-node
# https://hub.docker.com/r/eventstore/eventstore/tags
eventstore:
image: eventstore/eventstore:latest
container_name: eventstore
restart: on-failure
environment:
- EVENTSTORE_CLUSTER_SIZE=1
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=false
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_HTTP_PORT=2113
- EVENTSTORE_INSECURE=true
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
- EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
- EVENTSTORE_MEM_DB=true
ports:
- "1113:1113"
- ${EVENTSTORE_HOST_PORT:-2113}:${EVENTSTORE_PORT:-2113}
volumes:
- type: volume
source: eventstore-volume-data
target: /var/lib/eventstore
- type: volume
source: eventstore-volume-logs
target: /var/log/eventstore
networks:
- ecommerce-modular
# #######################################################
# # Redis
# #######################################################
## https://developer.redis.com/howtos/quick-start
## redis-stack is a image with redis modules enabled like JSON module
# redis:
# image: redis/redis-stack:latest
# container_name: redis
# restart: unless-stopped
# networks:
# - ecommerce-modular
# ports:
# - 6379:6379
networks:
ecommerce-modular:
name: ecommerce-modular
driver: bridge
volumes:
eventstore-volume-data:
eventstore-volume-logs: