-
Notifications
You must be signed in to change notification settings - Fork 65
/
docker-compose.Staging.Infrastructure.yaml
160 lines (152 loc) · 3.5 KB
/
docker-compose.Staging.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
version: "3.9"
services:
mssql:
container_name: mssql
image: mcr.microsoft.com/mssql/server
ports:
- "1433"
environment:
SA_PASSWORD: "!MyStrongPassword"
ACCEPT_EULA: "Y"
healthcheck:
test: /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P "$$SA_PASSWORD" -Q "SELECT 1" || exit 1
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
cpus: '1'
memory: 2G
restart_policy:
condition: any
networks:
- internal
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3-management-alpine
ports:
- "5672"
- "15672"
environment:
RABBITMQ_DEFAULT_USER: "guest"
RABBITMQ_DEFAULT_PASS: "guest"
RABBITMQ_DEFAULT_VHOST: "eventual-shop"
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
cpus: '1'
memory: 400M
restart_policy:
condition: any
networks:
- internal
mongodb:
container_name: mongodb
image: mongo:5.0.14
ports:
- "27017"
environment:
MONGO_INITDB_ROOT_USERNAME: "mongoadmin"
MONGO_INITDB_ROOT_PASSWORD: "secret"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo mongodb:27017/test --quiet
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
cpus: '1'
memory: 500M
restart_policy:
condition: any
networks:
- internal
proxy:
container_name: proxy
image: nginx:alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
webapi:
condition: service_healthy
webapp:
condition: service_started
ports:
- "8080:8080"
- "5000:5000"
deploy:
resources:
limits:
cpus: '1'
memory: 80M
restart_policy:
condition: any
networks:
- internal
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2
environment:
- discovery.type=single-node
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false
- ELASTIC_USERNAME=EventualShop
- ELASTIC_PASSWORD=EventualShop
healthcheck:
test: [ "CMD", "curl", "-f", "http://elasticsearch:9200/_cluster/health" ]
ulimits:
memlock:
soft: -1
hard: -1
deploy:
resources:
limits:
cpus: '1'
memory: 1G
restart_policy:
condition: any
ports:
- "9200"
- "9300"
networks:
- internal
kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:8.6.2
environment:
ELASTICSEARCH_URL: http://elasticsearch:9200
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
ELASTICSEARCH_USERNAME: EventualShop
ELASTICSEARCH_PASSWORD: EventualShop
healthcheck:
test: [ "CMD", "curl", "-f", "http://kibana:5601/api/status" ]
ports:
- "5601:5601"
depends_on:
elasticsearch:
condition: service_healthy
deploy:
resources:
limits:
cpus: '1'
memory: 1G
restart_policy:
condition: any
networks:
- internal
networks:
internal:
name: internal
driver: bridge