Commit 95a533fe0f44a42304389f8e80868ebe40cdbfb3
1 parent
1c12017b
Exists in
master
and in
3 other branches
Atualizações para divisão do componentes (Rabbit/Mongo/Código) - Requisição da MPOG
Showing
2 changed files
with
27 additions
and
24 deletions
Show diff stats
Dockerfile
| ... | ... | @@ -22,22 +22,10 @@ RUN apt-get install -y nodejs |
| 22 | 22 | RUN apt-get install -y python-setuptools |
| 23 | 23 | RUN easy_install pip |
| 24 | 24 | |
| 25 | -#Install express.js | |
| 26 | -#RUN npm install -g express-generator | |
| 27 | - | |
| 28 | -#Install RabbitMQ | |
| 29 | -RUN echo 'deb http://www.rabbitmq.com/debian/ testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list | |
| 30 | -RUN wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add - | |
| 31 | -RUN apt-get update | |
| 32 | -RUN apt-get install rabbitmq-server -y | |
| 33 | - | |
| 34 | 25 | #Install python and python lib for RabbitMQ |
| 35 | 26 | RUN apt-get install -y python |
| 36 | 27 | RUN pip install pika |
| 37 | 28 | |
| 38 | -#Enable RabbitMQ plugins | |
| 39 | -RUN rabbitmq-plugins enable rabbitmq_management | |
| 40 | - | |
| 41 | 29 | #Install Graylog |
| 42 | 30 | RUN pip install graypy |
| 43 | 31 | RUN pip install graypy[amqp] |
| ... | ... | @@ -54,12 +42,6 @@ RUN add-apt-repository ppa:mc3man/trusty-media |
| 54 | 42 | RUN apt-get -y update |
| 55 | 43 | RUN apt-get install -y ffmpeg gstreamer0.10-ffmpeg |
| 56 | 44 | |
| 57 | -#Install MongoDB | |
| 58 | -RUN sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 | |
| 59 | -RUN echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list | |
| 60 | -RUN apt-get -y update && apt-get install -y mongodb-org | |
| 61 | -RUN mkdir -p /data/db | |
| 62 | - | |
| 63 | 45 | WORKDIR /root/ |
| 64 | 46 | RUN mkdir -p ./storage/libras |
| 65 | 47 | |
| ... | ... | @@ -96,9 +78,8 @@ ENV NLTK_DATA="/root/vlibras-libs/aelius/nltk_data" |
| 96 | 78 | ENV PYTHONPATH=":/root/vlibras-libs/aelius:/root/vlibras-translate/src:/root/vlibras-libs/aelius:/root/vlibras-translate/src" |
| 97 | 79 | |
| 98 | 80 | #Portas de comunicacao do container |
| 99 | -EXPOSE 80:80 | |
| 100 | 81 | WORKDIR /root/translate-api/ |
| 101 | 82 | RUN npm i |
| 102 | 83 | |
| 103 | 84 | #Comando de entrada quando inicializado |
| 104 | -ENTRYPOINT (/usr/bin/mongod & rabbitmq-server start & sleep 1m) ; npm start & python /root/processManager.py | |
| 85 | +ENTRYPOINT ( sleep 1m) ; npm start & python /root/processManager.py | ... | ... |
docker-compose.yml
| 1 | 1 | version: '2' |
| 2 | 2 | |
| 3 | 3 | services: |
| 4 | - video: | |
| 5 | - image: vlibras/translate_container | |
| 4 | + | |
| 5 | + mongo: | |
| 6 | + image: mongo:3.0.4 | |
| 7 | + volumes: | |
| 8 | + - /data/db | |
| 9 | + ports: | |
| 10 | + - "27017" | |
| 11 | + | |
| 12 | + rabbit: | |
| 13 | + image: "rabbitmq:3-management" | |
| 14 | + ports: | |
| 15 | + - "15672" | |
| 16 | + - "5672" | |
| 17 | + volumes: | |
| 18 | + - ./rabbitmq:/var/lib/rabbitmq | |
| 19 | + | |
| 20 | + api: | |
| 21 | + build: . | |
| 22 | + links: | |
| 23 | + - mongo | |
| 24 | + - rabbit | |
| 6 | 25 | ports: |
| 7 | 26 | - "80:80" |
| 8 | -# volumes: | |
| 9 | -# - .:/data/ | |
| 27 | + volumes: | |
| 28 | + - core_db:/storage/ | |
| 10 | 29 | restart: always |
| 30 | + | |
| 31 | +volumes: | |
| 32 | + core_db: | ... | ... |