-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
114 lines (109 loc) · 2.97 KB
/
docker-compose.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
version: "3.9"
services:
# api:
# build:
# dockerfile: ./Dockerfile
# image:
# ports:
# - 8080:8080
# - 8081:8081
# environment:
# MONGODB.DBHOST: "mongodb:27017"
# MONGODB.DBUSER: "admin"
# MONGODB.DBPASSWORD: "password"
# REDIS.HOST: "redis:6379"
# external_links:
# - mongodb
# - redis
# # Start app
# command: reflex -g '*.go' go run main.go --start-service
mongoimport:
image: mongo
container_name: my-import
volumes:
- ./users.json:/src/data/users.json
command: mongoimport --host mongodb --db golangAPI --collection users --file /src/data/users.json
mongodb:
hostname: mongodb
image: mongo
container_name: mongodb-1
expose:
- 27017
ports:
- 27017:27017
depends_on:
- mongoimport
# environment:
# MONGO_INITDB_ROOT_USERNAME: "admin"
# MONGO_INITDB_ROOT_PASSWORD: "123456"
# MONGO_INITDB_DATABASE: "test-mongo"
# replicaset: rs0
volumes:
- ./mongodb-data:/data/db
command:
- /bin/bash
- -c
- |
mongod --replSet rs0 --bind_ip_all
mongosh --eval "rs.initiate({_id: \"rs0\",members: [{_id: 0, host: \"mongodb\"},{_id: 1, host: \"mongodb2\"}]})"
mongodb2:
hostname: mongodb2
image: mongo
# restart: always
container_name: mongodb-2
# replicaset: rs0
# environment:
# MONGO_INITDB_ROOT_USERNAME: "admin"
# MONGO_INITDB_ROOT_PASSWORD: "123456"
# MONGO_INITDB_DATABASE: "test-mongo"
expose:
- 27017
ports:
- "27018:27017"
volumes:
- ./mongodb-data-2:/data/db
command: mongod --replSet rs0 --bind_ip_all
depends_on:
- mongodb
# entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ]
# mongo-express:
# image: mongo-express
# container_name: mongo-express
# restart: always
# ports:
# - "28081:8081"
# environment:
# ME_CONFIG_MONGODB_SERVER: mongodb
# ME_CONFIG_BASICAUTH_USERNAME: admin
# ME_CONFIG_BASICAUTH_PASSWORD: changeme
# ME_CONFIG_MONGODB_AUTH_DATABASE: admin
# ME_CONFIG_MONGODB_ADMINUSERNAME: mongoadmin
# ME_CONFIG_MONGODB_ADMINPASSWORD: mongoadmin
# ME_CONFIG_MONGODB_URL: mongodb://mongodb:27017/
# depends_on:
# - mongodb
###
hazelcast:
image: hazelcast/hazelcast:5.3.1
ports:
- "5701:5701"
# volumes:
# - ./hazelcast-data:/opt/hazelcast/persistence
# - ./hazelcast-data:/opt/hazelcast
management-center:
image: hazelcast/management-center:5.3.1
ports:
- "8080:8080"
environment:
- MC_DEFAULT_CLUSTER=dev
- MC_DEFAULT_CLUSTER_MEMBERS=hazelcast
- MC_ADMIN_USER=leyla
- MC_ADMIN_PASSWORD=qweQWE12@
# - MC_METRICS_PERSISTENCE_ENABLED=true
# - PATH_TO_PERSISTENT_FOLDER=/data
- MIN_HEAP_SIZE='512M'
- MAX_HEAP_SIZE='3024M'
volumes:
- ./mgt-data:/data
# mongosh --eval "rs.initiate({_id: \"rs0\",members: [{_id: 0, host: \"mongodb\"},{_id: 1, host: \"mongodb2\"}#]})"
#