Sentry使用podman部署

Sentry默认使用docker部署
从25.8版本之后支持podman部署

  1. 环境查看
    系统环境
# cat /etc/redhat-release 
Rocky Linux release 9.3 (Blue Onyx)
# uname -a
Linux Rocky9Sentry003104 5.14.0-362.18.1.el9_3.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Feb 11 13:49:23 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

软件环境

# podman version
Client:       Podman Engine
Version:      5.6.0
API Version:  5.6.0
Go Version:   go1.25.7 (Red Hat 1.25.7-1.el9_7)
Built:        Thu Feb 26 00:57:19 2026
OS/Arch:      linux/amd64
# podman-compose version
podman-compose version 1.5.0
podman version 5.6.0
# podman images | grep sentry
ghcr.io/getsentry/sentry                    26.3.1  

Sentry版本也可以在安装之后登录Web页面后在页面底部查看
image

  1. 安装
    设置containerd配置文件
# sed '/#/d' /etc/containers/registries.conf
unqualified-search-registries = ["docker.io", "quay.io"]
short-name-mode = "permissive"

安装参考官网
https://develop.sentry.dev/self-hosted/
设置ulimit

# 临时生效
ulimit -s 65536
# 查看设置结果
ulimit -s
# 永久生效
把ulimit -s 65535添加至文件
/etc/profile
source /etc/profile
# 如果以上设置后安装还提示参数列表过长则设置
ulimit -s unlimited

克隆代码

git clone  https://github.com/getsentry/self-hosted.git

使用systemctl启动podman(重要)

systemctl enable --now podman.socket
systemctl enable podman
systemctl start podman

查看podman.sock

# ls -lah /run/podman/podman.sock 
srw-rw---- 1 root root 0  3月 31 15:26 /run/podman/podman.sock

使用podman安装sentry

# 设置容器使用podman然后执行安装脚本
CONTAINER_ENGINE_PODMAN=1 ./install.sh

是否同意上传数据,数据保留时间为30天
输入y确认
image
继续安装,安装过程中下载镜像
创建用户
image
输入邮箱和密码两次
image
输入以下命令运行
image

podman-compose --profile=feature-complete up --force-recreate -d

打开Web页面登录

# 地址
http://ip:900

输入设置的邮箱和密码登录报错

If you're continually seeing this issue, try the following steps:

Make sure cookies are enabled in your browser.
Close other tabs with Sentry loaded.
3.清除cookies(至少是Sentry域名下的cookies)
4.重新载入您试图提交的页面(不要重新提交数据)。
5.重新输入信息,然后再次提交表格。
Ensure the URL does not contain an extra "1" anywhere (eg: https://foo//saml -> https://foo/saml).

从24版本之后需要配置信任地址
修改配置文件

sentry/sentry.conf.py 

修改以下配置
image
再次打开首页配置SMTP
image

posted @ 2026-03-31 17:51  minseo  阅读(36)  评论(0)    收藏  举报