配置(#53): 固定 Docker Compose 基础设施镜像版本,移除 latest 标签
Build docker and publish / build (20.15.1) (push) Failing after 7m45s
Build docker and publish / build (20.15.1) (push) Failing after 7m45s
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
+2
-2
@@ -7,8 +7,8 @@ MYSQL_ROOT_PASSWORD=CHANGE_ME_TO_STRONG_PASSWORD
|
||||
# Grafana 管理员密码
|
||||
GRAFANA_PASSWORD=CHANGE_ME_TO_STRONG_PASSWORD
|
||||
|
||||
# PPanel Server 镜像标签(留空使用 latest)
|
||||
PPANEL_SERVER_TAG=latest
|
||||
# PPanel Server 镜像标签(由 CI/CD 传入不可变 tag,如 git SHA)
|
||||
PPANEL_SERVER_TAG=CHANGE_ME_TO_GIT_SHA
|
||||
|
||||
# AWS 区域(香港)
|
||||
AWS_REGION=ap-east-1
|
||||
|
||||
@@ -19,9 +19,10 @@ services:
|
||||
# ----------------------------------------------------
|
||||
# 1. 业务后端 (PPanel Server)
|
||||
# host 网络:可出外网,直接访问 AWS RDS/Redis;通过 127.0.0.1 访问 Tempo
|
||||
# PPANEL_SERVER_TAG 由 CI/CD 传入不可变镜像标签(如 git SHA)
|
||||
# ----------------------------------------------------
|
||||
ppanel-server:
|
||||
image: registry.kxsw.us/vpn-server:${PPANEL_SERVER_TAG:-latest}
|
||||
image: registry.kxsw.us/vpn-server:${PPANEL_SERVER_TAG:?please set PPANEL_SERVER_TAG to an immutable image tag}
|
||||
container_name: ppanel-server
|
||||
restart: always
|
||||
volumes:
|
||||
@@ -119,7 +120,7 @@ services:
|
||||
# 或配置 Nginx 反代(建议加认证)
|
||||
# ----------------------------------------------------
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
image: grafana/grafana:13.0.1
|
||||
container_name: ppanel-grafana
|
||||
restart: always
|
||||
ports:
|
||||
@@ -154,7 +155,7 @@ services:
|
||||
# 6. Prometheus (指标采集)
|
||||
# ----------------------------------------------------
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
image: prom/prometheus:v3.11.3
|
||||
container_name: ppanel-prometheus
|
||||
restart: always
|
||||
ports:
|
||||
@@ -179,7 +180,7 @@ services:
|
||||
# 7. Nginx Exporter (监控宿主机 Nginx)
|
||||
# ----------------------------------------------------
|
||||
nginx-exporter:
|
||||
image: nginx/nginx-prometheus-exporter:latest
|
||||
image: nginx/nginx-prometheus-exporter:1.5.0
|
||||
container_name: ppanel-nginx-exporter
|
||||
restart: always
|
||||
command:
|
||||
@@ -198,7 +199,7 @@ services:
|
||||
# 8. Node Exporter (宿主机监控)
|
||||
# ----------------------------------------------------
|
||||
node-exporter:
|
||||
image: prom/node-exporter:latest
|
||||
image: prom/node-exporter:v1.11.1
|
||||
container_name: ppanel-node-exporter
|
||||
restart: always
|
||||
volumes:
|
||||
@@ -221,7 +222,7 @@ services:
|
||||
# 9. cAdvisor (容器监控)
|
||||
# ----------------------------------------------------
|
||||
cadvisor:
|
||||
image: gcr.io/cadvisor/cadvisor:latest
|
||||
image: gcr.io/cadvisor/cadvisor:v0.55.1
|
||||
container_name: ppanel-cadvisor
|
||||
restart: always
|
||||
volumes:
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Docker Image Version Pins
|
||||
|
||||
This file records the infrastructure image versions pinned in `docker-compose.cloud.yml`.
|
||||
The versions below match the images observed on the test deployment on 2026-05-26.
|
||||
|
||||
| Service | Image | Running version source |
|
||||
| --- | --- | --- |
|
||||
| grafana | `grafana/grafana:13.0.1` | `grafana version 13.0.1` |
|
||||
| prometheus | `prom/prometheus:v3.11.3` | `prometheus, version 3.11.3` |
|
||||
| nginx-exporter | `nginx/nginx-prometheus-exporter:1.5.0` | image label `org.opencontainers.image.version=1.5.0` |
|
||||
| node-exporter | `prom/node-exporter:v1.11.1` | `node_exporter, version 1.11.1` |
|
||||
| cadvisor | `gcr.io/cadvisor/cadvisor:v0.55.1` | `cAdvisor version v0.55.1` |
|
||||
|
||||
The test deployment in `/root/bindbox/docker-compose.cloud.yml` also contains
|
||||
live-only exporter services that are not present in this repository's
|
||||
`docker-compose.cloud.yml`. They were pinned during staging validation:
|
||||
|
||||
| Test-only service | Image | Running version source |
|
||||
| --- | --- | --- |
|
||||
| mysql-exporter | `prom/mysqld-exporter:v0.19.0` | `mysqld_exporter, version 0.19.0` |
|
||||
| redis-exporter | `oliver006/redis_exporter:v1.82.0` | image label `org.opencontainers.image.version=v1.82.0` |
|
||||
|
||||
`ppanel-server` intentionally remains variable and requires `PPANEL_SERVER_TAG`
|
||||
from CI/CD so deployments use an immutable application image tag.
|
||||
|
||||
## Rollback
|
||||
|
||||
Restore the previous compose file from git and redeploy:
|
||||
|
||||
```sh
|
||||
git checkout HEAD~1 -- docker-compose.cloud.yml .env.example ops/docker-image-version-pins.md
|
||||
docker compose -f docker-compose.cloud.yml up -d
|
||||
```
|
||||
Reference in New Issue
Block a user