-
Notifications
You must be signed in to change notification settings - Fork 74
/
docker-compose-infra.yml
131 lines (127 loc) · 3.28 KB
/
docker-compose-infra.yml
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
version: '3'
services:
nestjs-microservice-primary:
container_name: nestjs-microservice-primary
image: mongo:4.2.20
entrypoint: ['/usr/bin/mongod', '--bind_ip_all', '--replSet', 'app']
volumes:
- mongo-primary-data:/data/db
- .docker/mongo/rs-init.sh:/scripts/mongo/rs-init.sh
ports:
- 27081:27017
networks:
mongo-network:
ipv4_address: 10.5.0.5
nestjs-microservice-secondary:
container_name: nestjs-microservice-secondary
image: mongo:4.2.20
entrypoint: ['/usr/bin/mongod', '--bind_ip_all', '--replSet', 'app']
volumes:
- mongo-secondary-data:/data/db
ports:
- 27082:27017
networks:
mongo-network:
ipv4_address: 10.5.0.6
nestjs-microservice-tertiary:
container_name: nestjs-microservice-tertiary
image: mongo:4.2.20
entrypoint: ['/usr/bin/mongod', '--bind_ip_all', '--replSet', 'app']
volumes:
- mongo-tertiary-data:/data/db
ports:
- 27083:27017
networks:
mongo-network:
ipv4_address: 10.5.0.7
postgres:
container_name: nestjs-microservice-postgres
image: postgres
env_file:
- .env
ports:
- '5432:5432'
volumes:
- nestjs-microservice-postgres:/data/postgres
- .docker/postgres/create-database.sql:/docker-entrypoint-initdb.d/create-database.sql
restart: always
networks:
- postgres-network
redis:
container_name: nestjs-microservice-redis
image: 'redis:alpine'
volumes:
- nestjs-microservice-redis:/data
ports:
- 6379:6379
zipkin-all-in-one:
container_name: nestjs-microservice-zipkin-all-in-one
image: openzipkin/zipkin:latest
ports:
- '9411:9411'
env_file:
- .env
prometheus:
container_name: nestjs-microservice-prometheus
image: prom/prometheus:v2.47.0
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--enable-feature=otlp-write-receiver'
- '--enable-feature=exemplar-storage'
env_file:
- .env
ports:
- '9090:9090'
volumes:
- .docker/prometheus/config.yml:/etc/prometheus/prometheus.yml
collector:
container_name: nestjs-microservice-collector
image: otel/opentelemetry-collector-contrib:latest
command: ['--config=/conf/collector-config.yaml']
volumes:
- .docker/collector/collector-config.yaml:/conf/collector-config.yaml
ports:
- '9464:9464'
- '4317:4317'
- '4318:4318'
depends_on:
- zipkin-all-in-one
mongo-express:
container_name: nestjs-microservice-mongo-express
image: mongo-express:0.49.0
depends_on:
- nestjs-microservice-primary
- nestjs-microservice-secondary
- nestjs-microservice-tertiary
restart: always
ports:
- 8081:8081
env_file:
- .env
networks:
mongo-network:
pgadmin:
container_name: nestjs-microservice-pgadmin
image: dpage/pgadmin4
env_file:
- .env
ports:
- '16543:80'
depends_on:
- postgres
networks:
- postgres-network
volumes:
nestjs-microservice-postgres:
nestjs-microservice-redis:
mongo-primary-data:
mongo-secondary-data:
mongo-tertiary-data:
networks:
mongo-network:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
postgres-network:
driver: bridge