Docker runs cabot

  docker

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

run

docker-compose up
Open
http://192.168.99.100:8080/
admin/admin

clipboard.png

summary

There are too many dependent components, and graphite has not been configured. It is not effective and cannot be configured in ui. It is rather laborious. It is recommended to refer to this function and rewrite it yourself.

docs