-
-
Save QuAzI/e4c262cfd46610793352c2afe134864e to your computer and use it in GitHub Desktop.
RabbitMQ on Windows Containers (Win10) for local development
This file contains hidden or 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
RABBITMQ_DEFAULT_VHOST=computer-name-in-lower-case | |
RABBITMQ_NODENAME=host-name.dev |
This file contains hidden or 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
version: '3.9' | |
services: | |
rabbitmq: | |
container_name: ${RABBITMQ_NODENAME:-rabbitmq} | |
hostname: ${RABBITMQ_NODENAME:-rabbitmq} | |
build: | |
context: . | |
dockerfile: Dockerfile | |
environment: | |
- RABBITMQ_DEFAULT_USER=elk | |
- RABBITMQ_DEFAULT_PASS=elk | |
- RABBITMQ_NODE_PORT=30673 | |
- RABBITMQ_DEFAULT_VHOST=${RABBITMQ_DEFAULT_VHOST} | |
ports: | |
- 30673:30673 | |
- 31673:15672 | |
networks: | |
default: | |
external: true | |
name: dev |
This file contains hidden or 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
FROM mcr.microsoft.com/windows/servercore:1809 | |
# ports https://www.rabbitmq.com/networking.html#ports | |
EXPOSE 5672 | |
EXPOSE 15672 | |
WORKDIR /app | |
ENV ERLANG_HOME="C:\app\erlang" | |
ENV RABBITMQ_BASE="C:\app\rabbitmq" | |
COPY install /app/install | |
SHELL ["powershell", "-Command"] | |
RUN Start-Process -Wait -FilePath install\\otp_win64_25.2.exe -ArgumentList /S, /D=$env:ERLANG_HOME | |
# rabbitmq exe inapplicable because always stuck silently | |
# RUN Start-Process -Wait -FilePath install\\rabbitmq-server-3.11.6.exe -ArgumentList /S, /D=$env:RABBITMQ_BASE | |
RUN Expand-Archive -Path install\rabbitmq-server-windows-3.11.6.zip -DestinationPath . ; \ | |
Rename-Item -Path "rabbitmq_server-3.11.6" -NewName 'rabbitmq' | |
WORKDIR /app/rabbitmq/sbin | |
SHELL ["cmd", "/S", "/C"] | |
ENV RABBITMQ_DEFAULT_USER=guest | |
ENV RABBITMQ_DEFAULT_PASS=guest | |
#ENV RABBITMQ_DEFAULT_VHOST=${COMPUTERNAME} | |
#ENV SERVER_ADDITIONAL_ERL_ARGS=-kernel net_ticktime 120 | |
RUN "rabbitmq-plugins enable rabbitmq_management" | |
ENTRYPOINT "rabbitmq-server" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment