Update docker-compose.yml
Browse files- docker-compose.yml +10 -68
docker-compose.yml
CHANGED
|
@@ -1,74 +1,16 @@
|
|
| 1 |
-
version:
|
| 2 |
|
| 3 |
services:
|
| 4 |
-
|
| 5 |
-
image: redis:6.2
|
| 6 |
-
container_name: redis-master
|
| 7 |
-
ports:
|
| 8 |
-
- "6379:6379"
|
| 9 |
-
command: redis-server
|
| 10 |
-
networks:
|
| 11 |
-
- redisnet
|
| 12 |
-
|
| 13 |
-
redis-replica:
|
| 14 |
-
image: redis:6.2
|
| 15 |
-
container_name: redis-replica
|
| 16 |
-
depends_on:
|
| 17 |
-
- redis-master
|
| 18 |
-
command: >
|
| 19 |
-
sh -c "redis-server --replicaof redis-master 6379"
|
| 20 |
-
networks:
|
| 21 |
-
- redisnet
|
| 22 |
-
|
| 23 |
-
sentinel1:
|
| 24 |
-
image: redis:6.2
|
| 25 |
-
container_name: sentinel1
|
| 26 |
-
depends_on:
|
| 27 |
-
- redis-master
|
| 28 |
-
volumes:
|
| 29 |
-
- ./sentinel/sentinel1.conf:/etc/sentinel.conf
|
| 30 |
-
command: redis-server /etc/sentinel.conf --sentinel
|
| 31 |
-
ports:
|
| 32 |
-
- "26379:26379"
|
| 33 |
-
networks:
|
| 34 |
-
- redisnet
|
| 35 |
-
|
| 36 |
-
sentinel2:
|
| 37 |
-
image: redis:6.2
|
| 38 |
-
container_name: sentinel2
|
| 39 |
-
depends_on:
|
| 40 |
-
- redis-master
|
| 41 |
-
volumes:
|
| 42 |
-
- ./sentinel/sentinel2.conf:/etc/sentinel.conf
|
| 43 |
-
command: redis-server /etc/sentinel.conf --sentinel
|
| 44 |
-
ports:
|
| 45 |
-
- "26380:26379"
|
| 46 |
-
networks:
|
| 47 |
-
- redisnet
|
| 48 |
-
|
| 49 |
-
sentinel3:
|
| 50 |
-
image: redis:6.2
|
| 51 |
-
container_name: sentinel3
|
| 52 |
-
depends_on:
|
| 53 |
-
- redis-master
|
| 54 |
-
volumes:
|
| 55 |
-
- ./sentinel/sentinel3.conf:/etc/sentinel.conf
|
| 56 |
-
command: redis-server /etc/sentinel.conf --sentinel
|
| 57 |
-
ports:
|
| 58 |
-
- "26381:26379"
|
| 59 |
-
networks:
|
| 60 |
-
- redisnet
|
| 61 |
-
|
| 62 |
-
app:
|
| 63 |
build: .
|
| 64 |
-
depends_on:
|
| 65 |
-
- sentinel1
|
| 66 |
-
- sentinel2
|
| 67 |
-
- sentinel3
|
| 68 |
ports:
|
| 69 |
- "5000:5000"
|
| 70 |
-
|
| 71 |
-
-
|
|
|
|
|
|
|
| 72 |
|
| 73 |
-
|
| 74 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.8"
|
| 2 |
|
| 3 |
services:
|
| 4 |
+
server:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
build: .
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
ports:
|
| 7 |
- "5000:5000"
|
| 8 |
+
depends_on:
|
| 9 |
+
- nats
|
| 10 |
+
environment:
|
| 11 |
+
- NATS_URL=nats://nats:4222
|
| 12 |
|
| 13 |
+
nats:
|
| 14 |
+
image: nats:2.10
|
| 15 |
+
ports:
|
| 16 |
+
- "4222:4222"
|