forked from in28minutes/docker-crash-course
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-reference.yml
107 lines (100 loc) · 3 KB
/
docker-compose-reference.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
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
version: '3.7'
# Removed subprocess.CalledProcessError: Command '['/usr/local/bin/docker-credential-desktop', 'get']' returned non-zero exit status 1
# I had this:
# cat ~/.docker/config.json
# {"auths":{},"credsStore":"", "credsStore":"desktop","stackOrchestrator":"swarm"}
# I updated to this:
# {"auths":{},"credsStore":"","stackOrchestrator":"swarm"}
services:
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.5.3-management
ports:
- "5672:5672"
- "15672:15672"
networks:
- currency-microservices-network
naming-server:
build: netflix-eureka-naming-server
container_name: naming-server
ports:
- "8761:8761"
- "28787:8787"
networks:
- currency-microservices-network
zipkin-server:
image: openzipkin/zipkin
container_name: zipkin
environment:
- STORAGE_TYPE=mem
# Uncomment to enable debug logging
# - JAVA_OPTS=-Dlogging.level.zipkin=DEBUG
depends_on: # Start the depends_on first
- rabbitmq
environment:
- RABBIT_URI=amqp://guest:guest@rabbitmq:5672
ports:
- 9411:9411
networks:
- currency-microservices-network
currency-exchange-service:
image: in28min/currency-exchange-service:0.0.1-SNAPSHOT
container_name: currency-exchange-service
#build:
#context: ../05-simple-microservices/currency-exchange-service
#context: .
#dockerfile: Dockerfile
ports:
- "8000:8000"
restart: always
depends_on: # Start the depends_on first
- rabbitmq
- zipkin-server
- naming-server
- zuul-api-gateway
environment:
- RABBIT_URI=amqp://guest:guest@rabbitmq:5672
networks:
- currency-microservices-network
currency-conversion-service:
image: in28min/currency-conversion-service:0.0.1-SNAPSHOT
container_name: currency-conversion-service
#build:
#context: ../05-simple-microservices/currency-conversion-service
#context: .
#dockerfile: Dockerfile
ports:
- "8100:8100"
restart: always
depends_on: # Start the depends_on first
- rabbitmq
- zipkin-server
- currency-exchange-service
- naming-server
- zuul-api-gateway
environment:
- CURRENCY_EXCHANGE_URI=http://currency-exchange-service:8000
- RABBIT_URI=amqp://guest:guest@rabbitmq:5672
networks:
- currency-microservices-network
zuul-api-gateway:
image: in28min/netflix-zuul-api-gateway-server:0.0.1-SNAPSHOT
container_name: zuul-api-gateway
#build:
#context: ../05-simple-microservices/currency-conversion-service
#context: .
#dockerfile: Dockerfile
ports:
- "8765:8765"
restart: always
depends_on: # Start the depends_on first
- rabbitmq
- zipkin-server
- naming-server
environment:
- RABBIT_URI=amqp://guest:guest@rabbitmq:5672
networks:
- currency-microservices-network
# Networks to be created to facilitate communication between containers
networks:
currency-microservices-network: