Installation of RabbitMQ – docker-compose

Eden Ko·2023년 5월 10일
0

RabbitMQ

목록 보기
2/3

프로젝트 폴더 생성

$ mkdir rabbitmq-tutor

도커 및 도커컴포즈 설치 및 확인

$ docker -v
Docker version 19.03.5, build 633a0ea

$ docker-compose -v
docker-compose version 1.24.1, build 4667896b

docker-compose.yaml 생성

version: "3.6"
# https://docs.docker.com/compose/compose-file/
services:
  rabbitmq:
    image: 'rabbitmq:3.6-management-alpine'
    ports:
      # The standard AMQP protocol port
      - '5672:5672'
      # HTTP management UI
      - '15672:15672'
    environment:
      # The location of the RabbitMQ server.  "amqp" is the protocol;
      # "rabbitmq" is the hostname.  Note that there is not a guarantee
      # that the server will start first!  Telling the pika client library
      # to try multiple times gets around this ordering issue.
      AMQP_URL: 'amqp://rabbitmq?connection_attempts=5&retry_delay=5'
      RABBITMQ_DEFAULT_USER: "guest"
      RABBITMQ_DEFAULT_PASS: "guest"
    networks:
      - network
networks:
  # Declare our private network.  We must declare one for the magic
  # Docker DNS to work, but otherwise its default settings are fine.
  network: {}

도커 실행

$ docker-compose up
profile
Junior Developer

0개의 댓글

관련 채용 정보