Skip to content

Commit

Permalink
add new rabbitmq - over TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
metavige committed May 27, 2021
1 parent cb6e402 commit f85fdd1
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 12 deletions.
34 changes: 34 additions & 0 deletions rabbitmq/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: "3"
services:
rabbitmq:
image: rabbitmq:3.8-management-alpine
# ports:
# - "5672:5672"
container_name: rabbitmq
labels:
- 'traefik.enable=true'
- 'traefik.docker.network=devops'
# web browser access to RabbitMQ management GUI
- 'traefik.http.routers.rabbitmq-mgr.tls=true'
- 'traefik.http.routers.rabbitmq-mgr.rule=Host(`rabbitmq-management.docker.internal`)'
- 'traefik.http.routers.rabbitmq-mgr.entrypoints=websecure'
- 'traefik.http.services.rabbitmq-mgr.loadbalancer.server.port=15672'
# AMQPS - SSL terminated by traefik (over 443, not 5672)
- 'traefik.tcp.routers.rabbitmq.tls=true'
- 'traefik.tcp.routers.rabbitmq.rule=HostSNI(`rabbitmq.docker.internal`)'
- 'traefik.tcp.routers.rabbitmq.entrypoints=websecure'
- 'traefik.tcp.services.rabbitmq.loadbalancer.server.port=5672'
environment:
- 'RABBITMQ_DEFAULT_USER=guest'
- 'RABBITMQ_DEFAULT_PASS=guest'
volumes:
- rabbitmq:/var/lib/rabbitmq
- ./enable_plugins:/etc/rabbitmq/enable_plugins:ro
networks:
- devops
volumes:
rabbitmq: {}

networks:
devops:
external: true
1 change: 1 addition & 0 deletions rabbitmq/enable_plugins
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[rabbitmq_management,rabbitmq_prometheus].
24 changes: 12 additions & 12 deletions spring-cloud/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ version: "3"
services:
rabbitmq:
image: rabbitmq:3.8-management-alpine
ports:
- "5672:5672"
# ports:
# - "5672:5672"
container_name: rabbitmq
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.rabbitmq.tls=true'
- 'traefik.http.routers.rabbitmq.rule=Host(`rabbitmq.docker.internal`)'
- 'traefik.http.routers.rabbitmq.entrypoints=websecure'
- 'traefik.http.services.rabbitmq.loadbalancer.server.port=15672'
- 'traefik.docker.network=devops'
environment:
- 'RABBITMQ_DEFAULT_USER=guest'
- 'RABBITMQ_DEFAULT_PASS=p@ssw0rd'
# labels:
# - 'traefik.enable=true'
# - 'traefik.http.routers.rabbitmq.tls=true'
# - 'traefik.http.routers.rabbitmq.rule=Host(`rabbitmq.docker.internal`)'
# - 'traefik.http.routers.rabbitmq.entrypoints=websecure'
# - 'traefik.http.services.rabbitmq.loadbalancer.server.port=15672'
# - 'traefik.docker.network=devops'
# environment:
# - 'RABBITMQ_DEFAULT_USER=guest'
# - 'RABBITMQ_DEFAULT_PASS=p@ssw0rd'
networks:
- devops
# eureka:
Expand Down

0 comments on commit f85fdd1

Please sign in to comment.