forked from SamoraMachel/Ecommerce-Microservice
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
82 lines (75 loc) · 1.85 KB
/
docker-compose.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
version: '3.6'
services:
zookeeper:
image: wurstmeister/zookeeper
restart: always
container_name: microservice-zookeeper
hostname: zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
container_name: microservice-kafka
hostname: kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
depends_on:
- zookeeper
kafka-manager:
image: hlebalbau/kafka-manager:stable
container_name: microservice-kafka-manager
hostname: kafka-manager
ports:
- 9000:9000
environment:
ZK_HOSTS: zookeeper:2181
APPLICATION_SECRET: "random-secret"
depends_on:
- kafka
command: -Dpidfile.path=/dev/null
product-crdb:
container_name: product-crdb
image: cockroachdb/cockroach:latest
volumes:
- ./data/product-crdb:/cockroach/cockroach-data
command: start-single-node --insecure
ports:
- "26257:26257"
- "8082:8080"
networks:
network_cockroachdb:
aliases:
- product-crdb
user-crdb:
container_name: user-crdb
image: cockroachdb/cockroach:latest
volumes:
- ./data/user-crdb:/cockroach/cockroach-data
command: start-single-node --insecure
ports:
- "26258:26257"
- "8083:8080"
networks:
network_cockroachdb:
aliases:
- user-crdb
user-backend:
container_name: user-backend
build:
context: ./src/ProductMicroservice
dockerfile: dockerfile
ports:
- 5551:8000
volumes:
- .:/backend/user
depends_on:
- user-crdb
command: "python run.py"
environment:
DATABASE_URL: "postgresql://root@user-crdb:26258/defaultdb?sslmode=disable"
networks:
network_cockroachdb:
driver: bridge