Fork me on GitHub

docker下安装sentry

安装Docker

  • 脚本
1
$ wget -qO- https://get.docker.com/ | sh
1
2
3
4
5
6
7
8
$ curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce

安装docker-compose

1
$ pip install -U docker-compose

如果提示没有pip,则需要安装pip

1
$ apt-get install python-pip

获取sentry

1
git clone https://github.com/getsentry/onpremise.git

cd到onpremise目录下

1.构建容器并创建数据库和sentry安装目录

1
$ mkdir -p data/{sentry,postgres}

2.配置国内源

1
2
$ cd /etc/docker
$ touch daemon.json

daemon.json里面写入:

1
2
3
{
"registry-mirrors": ["https://docker.mirrors.ustc.edu.cn/"]
}
1
$ service docker restart

3.生成secret key并添加到docker-compose文件里

1
$ docker-compose run --rm web config generate-secret-key

4.重建数据库,并创建sentry超级管理员用户

1
$ docker-compose run --rm web upgrade

5.启动所有的服务

1
$ docker-compose up -d

访问

  • 访问http://ip:9000
    • ip为你本地或者服务器的ip

      以上是ubuntu 16.04下进行

禹都一只猫,热爱IT,支持原创