File tree Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Expand file tree Collapse file tree 1 file changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ services:
34
34
35
35
schema-registry :
36
36
image : confluentinc/cp-schema-registry:5.4.0-beta1
37
- # ports:
38
- # - 8081:8081
37
+ ports :
38
+ - 8081:8081
39
39
container_name : syslog_schema-registry
40
40
hostname : schema-registry
41
41
depends_on :
@@ -137,14 +137,34 @@ services:
137
137
sleep infinity
138
138
139
139
mongodb :
140
+ # *-----------------------------*
141
+ # To connect to mongoDB
142
+ # docker exec --interactive --tty syslog_mongodb mongo localhost:27017
143
+ # *-----------------------------*
140
144
image : mongo:4.2.2
141
145
container_name : syslog_mongodb
142
146
hostname : mongodb
143
147
ports :
144
148
- " 27017:27017"
145
- # environment:
146
- # MONGO_INITDB_ROOT_USERNAME: root
147
- # MONGO_INITDB_ROOT_PASSWORD: example
149
+ command :
150
+ - bash
151
+ - -c
152
+ - |
153
+ # Launch mongodb
154
+ mongod --replSet replSet01 --bind_ip_all &
155
+ # Wait for Mongo to be available
156
+ # Based on https://stackoverflow.com/questions/16542372/shell-script-check-mongod-server-is-running
157
+ while : ; do
158
+ mongo_status=$$(mongo --eval "db.stats()" > /dev/null; echo $$?)
159
+ echo -e $$(date) " Mongo RC: " $$mongo_status " (waiting for 0)"
160
+ if [ $$mongo_status -eq 0 ] ; then
161
+ break
162
+ fi
163
+ sleep 5
164
+ done
165
+ # Init the replicaset
166
+ mongo admin --eval "rs.initiate();"
167
+ sleep infinity
148
168
149
169
neo4j :
150
170
image : neo4j:3.5-enterprise
You can’t perform that action at this time.
0 commit comments