Please enable Javascript to view the contents

Drone配置管理员账号

 ·  ☕ 1 分钟

默认已经将drone数据持久化出来了

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
    spec:
      containers:
      - envFrom:
        - configMapRef:
            name: drone
        image: registry.cn-beijing.aliyuncs.com/k7scn/drone:2
        imagePullPolicy: Always
        name: drone
        volumeMounts:
        - mountPath: /data
          name: data
      restartPolicy: Always
      volumes:
      - hostPath:
          path: /data/drone
          type: DirectoryOrCreate
        name: data

debian安装sqlite3

1
2
apt update
apt install sqlite3 -y

修改数据

1
2
3
4
5
6
sqlite3 database.sqlite
.header on #开启头部显示。
.mode column # 列输出
.tables
select * from users;
update users set user_admin = 1;

验证

1
2
3
4
5
6
drone user info ysicing
User: ysicing
Email: i@ysicing.me
Admin: true
Active: true
Machine: false
分享

ysicing
作者
ysicing
云原生爱好者