您的位置:首页 > 运维架构 > Docker

docker运行cabot

2016-09-25 00:00 411 查看
##docker-compose

cabot:
build: .
links:
- postgres
- redis
- smtp
volumes:
- /opt/cabot
environment:
DATABASE_URL: "postgres://postgres:cabot@postgres:5432/postgres"
CELERY_BROKER_URL: "redis://redis:6379/1"
SES_HOST: smtp
SES_PORT: 25

# we do not use the official postgres image here as it does not start quickly
# enough for use with docker-compose
postgres:
image: orchardup/postgresql
environment:
POSTGRESQL_USER: postgres
POSTGRESQL_PASS: cabot
POSTGRESQL_DB: postgres

redis:
image: redis:2.8

smtp:
image: tianon/exim4

nginx:
image: nginx
ports:
- "8080:8080"
links:
- cabot
volumes_from:
- cabot
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro

##dockerfile

# A Cabot container
#
# https://github.com/socialwareinc/cabot-docker #
# VERSION 1.0

FROM ubuntu-upstart:trusty

RUN apt-get update
RUN apt-get install -y build-essential nodejs libpq-dev python-dev npm git \
curl libldap2-dev libsasl2-dev iputils-ping

RUN curl --silent --show-error --retry 5 https://bootstrap.pypa.io/get-pip.py | sudo python2.7

RUN git clone https://github.com/arachnys/cabot.git /opt/cabot
ADD fixture.json /opt/cabot/
ADD run.sh /opt/cabot/
ADD gunicorn.conf /opt/cabot/
ADD production.env /opt/cabot/conf/
ADD development.env /opt/cabot/conf/

RUN pip install -e /opt/cabot
RUN npm install --no-color -g coffee-script less@1.3

ENV PATH $PATH:/opt/cabot/
ENV PYTHONPATH $PYTHONPATH:/opt/cabot/

ENV DJANGO_SETTINGS_MODULE cabot.settings
ENV HIPCHAT_URL https://api.hipchat.com/v1/rooms/message ENV LOG_FILE /var/log/cabot
ENV PORT 5000

ENV DJANGO_SECRET_KEY 2FL6ORhHwr5eX34pP9mMugnIOd3jzVuT45f7w430Mt5PnEwbcJgma0q8zUXNZ68A

RUN ["ln", "-s", "/usr/bin/nodejs", "/usr/bin/node"]

EXPOSE 5000
WORKDIR /opt/cabot/
CMD . /opt/cabot/run.sh

##运行
docker-compose up
打开
http://192.168.99.100:8080/
admin/admin



##summary
依赖组件太多,另外没有配置了graphite没有生效,不能在ui进行配置,比较费劲,建议参考该功能,自己重写。

##docs

cabot-docker
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Docker cabot