Skip to content

Commit

Permalink
Merge pull request #8 from M6Web/feature/docker
Browse files Browse the repository at this point in the history
Add Docker and fig config files
  • Loading branch information
mikaelrandy committed Jan 14, 2015
2 parents 4a1c2cd + 12172c5 commit 554e572
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu:14.04

MAINTAINER M6Web <[email protected]>

RUN apt-get update

RUN apt-get -y install wget

RUN wget -qO - https://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add -
RUN echo "deb http://www.rabbitmq.com/debian/ testing main" >> /etc/apt/sources.list

RUN DEBIAN_FRONTEND=noninteractive apt-get update

RUN DEBIAN_FRONTEND=noninteractive apt-get -y install \
git \
rabbitmq-server \
vim

RUN rabbitmq-plugins enable rabbitmq_management

RUN echo "[{rabbit, [{loopback_users, []}]}]." >> /etc/rabbitmq/rabbitmq.config

RUN echo 'root:root' | chpasswd

ADD docker/start.sh /root/start.sh
RUN chmod +x /root/start.sh

VOLUME ["/var/log/rabbitmq"]

EXPOSE 15672
EXPOSE 5672

CMD ["/bin/bash", "/root/start.sh"]
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,25 @@ DataCollector is enabled by default if kernel.debug is set. Typically in the dev
composer install
./bin/atoum
```
# Docker
If you have a multi-containers apps, we provide a Dockerfile for a container with rabbitmq-server.
This container is for testing only.
Example of fig.yml :
```
web:
build: .
volumes:
- .:/var/www
links:
- rabbitmq:rabbitmq.local
rabbitmq:
build: vendor/m6web/amqp-bundle/
ports:
- "15672:15672"
- "5672:5672"
```
7 changes: 7 additions & 0 deletions docker/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

ulimit -n 1024

echo "RabbitMQ Management : http://localhost:15672/"

exec rabbitmq-server $@
5 changes: 5 additions & 0 deletions fig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rabbitmq:
build: .
ports:
- "15672:15672"
- "5672:5672"

0 comments on commit 554e572

Please sign in to comment.