-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Use rabbitmq container as event broker - Use consul container as service registry
- Loading branch information
1 parent
a94df8d
commit 167f3e5
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
version: '3' | ||
|
||
services: | ||
consul: | ||
# Consul will be used to manage service discovery | ||
image: progrium/consul:latest | ||
hostname: consul | ||
command: -server -bootstrap -rejoin | ||
ports: | ||
- "8300:8300" | ||
- "8400:8400" | ||
- "8500:8500" | ||
- "8600:53/udp" | ||
rabbit: | ||
# rabbitmq will be used as message broker to interact with other services | ||
image: rabbitmq:management | ||
hostname: rabbit | ||
ports: | ||
- "5672:5672" | ||
- "15672:15672" | ||
environment: | ||
- RABBITMQ_DEFAULT_USER=admin | ||
- RABBITMQ_DEFAULT_PASS=password | ||
listen: | ||
# listen is the actual listener service | ||
command: /bin/sh -c "sleep 5; ./app;" | ||
image: registry.gitlab.com/nkprince007/listen:latest | ||
# build: . | ||
ports: | ||
- "8000:8000" | ||
environment: | ||
- MICRO_REGISTRY=consul | ||
- MICRO_REGISTRY_ADDRESS=consul | ||
- MICRO_BROKER=rabbitmq | ||
- MICRO_BROKER_ADDRESS=amqp://admin:password@rabbit:5672 | ||
links: | ||
- consul | ||
- rabbit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters