forked from DevOps/deploy.stack
Merge branch 'main' of 6t7.net:cnphpbb/deploy.stack
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
Cadvisor_Tag_Ver=v0.53.0
|
Cadvisor_Tag_Ver=v0.53.0
|
||||||
Cadvisor_Image=hub.tp229.com:3500/google/cadvisor:${Cadvisor_Tag_Ver}
|
Cadvisor_Image=hub.6t7.net/base/cadvisor:${Cadvisor_Tag_Ver}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
IMAGE_TAG=3.6.2
|
||||||
|
IMAGE_NAME=grafana/loki:${IMAGE_TAG}
|
||||||
|
|||||||
45
dbSer/loki/loki-config.yaml
Normal file
45
dbSer/loki/loki-config.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# Loki configuration file
|
||||||
|
# https://grafana.com/docs/loki/latest/configuration/
|
||||||
|
# version: 3.6.2
|
||||||
|
auth_enabled: false
|
||||||
|
|
||||||
|
server:
|
||||||
|
http_listen_port: 3100
|
||||||
|
|
||||||
|
common:
|
||||||
|
instance_addr: 127.0.0.1
|
||||||
|
path_prefix: /loki
|
||||||
|
storage:
|
||||||
|
filesystem:
|
||||||
|
chunks_directory: /loki/chunks
|
||||||
|
rules_directory: /loki/rules
|
||||||
|
replication_factor: 1
|
||||||
|
ring:
|
||||||
|
kvstore:
|
||||||
|
store: inmemory
|
||||||
|
|
||||||
|
schema_config:
|
||||||
|
configs:
|
||||||
|
- from: 2020-10-24
|
||||||
|
store: tsdb
|
||||||
|
object_store: filesystem
|
||||||
|
schema: v13
|
||||||
|
index:
|
||||||
|
prefix: index_
|
||||||
|
period: 24h
|
||||||
|
|
||||||
|
ruler:
|
||||||
|
alertmanager_url: http://localhost:9093
|
||||||
|
|
||||||
|
# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration
|
||||||
|
# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/
|
||||||
|
#
|
||||||
|
# Statistics help us better understand how Loki is used, and they show us performance
|
||||||
|
# levels for most users. This helps us prioritize features and documentation.
|
||||||
|
# For more information on what's sent, look at
|
||||||
|
# https://github.com/grafana/loki/blob/main/pkg/usagestats/stats.go
|
||||||
|
# Refer to the buildReport method to see what goes into a report.
|
||||||
|
#
|
||||||
|
# If you would like to disable reporting, uncomment the following lines:
|
||||||
|
#analytics:
|
||||||
|
# reporting_enabled: false
|
||||||
@@ -2,4 +2,26 @@
|
|||||||
|
|
||||||
[loki docker 安装文档](https://grafana.com/docs/loki/latest/setup/install/docker/)
|
[loki docker 安装文档](https://grafana.com/docs/loki/latest/setup/install/docker/)
|
||||||
|
|
||||||
|
### 安装 loki 服务
|
||||||
|
```
|
||||||
|
mkdir -p loki
|
||||||
|
cd loki
|
||||||
|
wget https://raw.githubusercontent.com/grafana/loki/main/cmd/loki/loki-config.yaml -O loki-config.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
### 配置多租户认证配置
|
||||||
|
|
||||||
|
[参考文档](https://grafana.com/docs/loki/latest/configuration/#auth_enabled)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
auth_enabled: true
|
||||||
|
|
||||||
|
limits_config:
|
||||||
|
allow_private_metrics: true
|
||||||
|
enforce_metric_name: false
|
||||||
|
reject_old_samples: true
|
||||||
|
reject_old_samples_max_age: 168h
|
||||||
|
|
||||||
|
multitenancy_enabled: true
|
||||||
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
## RUN: docker compose -p loki --env-file ./dbSer/loki/env.cfg -f ./dbSer/loki/stack.yml up -d
|
||||||
|
services:
|
||||||
|
loki:
|
||||||
|
image: ${IMAGE_NAME}
|
||||||
|
ports:
|
||||||
|
- "3100:3100"
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai
|
||||||
|
- LANG=zh_CN.UTF-8
|
||||||
|
volumes:
|
||||||
|
- /data/loki/loki-config.yaml:/etc/loki/loki-config.yaml
|
||||||
|
command: -config.file=/etc/loki/loki-config.yaml
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
IMAGE_TAG_REDISV6=redis:6.2.20-alpine
|
IMAGE_TAG_REDISV6=redis:6.2.21-alpine
|
||||||
IMAGE_TAG_REDISV7=redis:7.2.11-alpine
|
IMAGE_TAG_REDISV7=redis:7.4.7-alpine
|
||||||
IMAGE_TAG_REDISV8=redis:8.2.2-alpine
|
IMAGE_TAG_REDISV8=redis:8.4.0-alpine
|
||||||
IMAGE_TAG_VALKEYV8=valkey/valkey:8.1.4-alpine
|
IMAGE_TAG_VALKEY_Latest=valkey/valkey:9.0.0
|
||||||
IMAGE_TAG_VALKEYV7=valkey/valkey:7.2.11-alpine
|
IMAGE_TAG_VALKEY_V8=valkey/valkey:8.1.5
|
||||||
Volumes_PATH=/data/volumes/redis
|
Volumes_PATH=/data/volumes/redis
|
||||||
REDIS_PASSWORD=AGC4eGx2aq8rSiZXBP
|
REDIS_PASSWORD=AGC4eGx2aq8rSiZXBP
|
||||||
|
|||||||
@@ -24,12 +24,13 @@
|
|||||||
|
|
||||||
解压安装包:
|
解压安装包:
|
||||||
```
|
```
|
||||||
|
## cd /data/harbor
|
||||||
tar xvf harbor-offline-installer-v2.14.1.tgz
|
tar xvf harbor-offline-installer-v2.14.1.tgz
|
||||||
```
|
```
|
||||||
|
|
||||||
2. 进入harbor安装目录,修改配置文件
|
2. 进入harbor安装目录,修改配置文件
|
||||||
```
|
```
|
||||||
cd ./harbor
|
cd /data/harbor
|
||||||
#复制 harbor的配置文件并改名harbor.yml
|
#复制 harbor的配置文件并改名harbor.yml
|
||||||
cp -ar harbor.yml.tmpl harbor.yml
|
cp -ar harbor.yml.tmpl harbor.yml
|
||||||
#修改文件
|
#修改文件
|
||||||
@@ -48,10 +49,3 @@ vim harbor.yml
|
|||||||
docker compose -p harbor -f ./docker-compose.yml pull
|
docker compose -p harbor -f ./docker-compose.yml pull
|
||||||
docker compose -p harbor -f ./docker-compose.yml up -d
|
docker compose -p harbor -f ./docker-compose.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
|
||||||
root@hkthyear-8015912443:/data/caddy/certificate/certificates/acme-v02.api.letsencrypt.org-directory/hub.6t7.net# lsd
|
|
||||||
hub.6t7.net.crt hub.6t7.net.json hub.6t7.net.key
|
|
||||||
root@hkthyear-8015912443:/data/caddy/certificate/certificates/acme-v02.api.letsencrypt.org-directory/hub.6t7.net#
|
|
||||||
harbor#1977
|
|
||||||
```
|
|
||||||
@@ -63,6 +63,7 @@ services:
|
|||||||
- ./n9eetc_pg:/app/etc
|
- ./n9eetc_pg:/app/etc
|
||||||
ports:
|
ports:
|
||||||
- "17000:17000"
|
- "17000:17000"
|
||||||
|
- "20090:20090"
|
||||||
networks:
|
networks:
|
||||||
- nightingale
|
- nightingale
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -76,27 +77,27 @@ services:
|
|||||||
command: >
|
command: >
|
||||||
sh -c "/app/n9e"
|
sh -c "/app/n9e"
|
||||||
|
|
||||||
categraf:
|
# categraf:
|
||||||
image: "flashcatcloud/categraf:latest"
|
# image: "flashcatcloud/categraf:latest"
|
||||||
container_name: "categraf"
|
# container_name: "categraf"
|
||||||
hostname: "categraf01"
|
# hostname: "categraf01"
|
||||||
restart: always
|
# restart: always
|
||||||
environment:
|
# environment:
|
||||||
TZ: Asia/Shanghai
|
# TZ: Asia/Shanghai
|
||||||
HOST_PROC: /hostfs/proc
|
# HOST_PROC: /hostfs/proc
|
||||||
HOST_SYS: /hostfs/sys
|
# HOST_SYS: /hostfs/sys
|
||||||
HOST_MOUNT_PREFIX: /hostfs
|
# HOST_MOUNT_PREFIX: /hostfs
|
||||||
WAIT_HOSTS: nightingale:17000, nightingale:20090
|
# WAIT_HOSTS: nightingale:17000, nightingale:20090
|
||||||
volumes:
|
# volumes:
|
||||||
- ./categraf/conf:/etc/categraf/conf
|
# - ./categraf/conf:/etc/categraf/conf
|
||||||
- /:/hostfs
|
# - /:/hostfs
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
# - /var/run/docker.sock:/var/run/docker.sock
|
||||||
- ./prometc_vm:/etc/prometheus
|
# - ./prometc_vm:/etc/prometheus
|
||||||
# ports:
|
# # ports:
|
||||||
# - "9100:9100/tcp"
|
# # - "9100:9100/tcp"
|
||||||
networks:
|
# networks:
|
||||||
- nightingale
|
# - nightingale
|
||||||
depends_on:
|
# depends_on:
|
||||||
- nightingale
|
# - nightingale
|
||||||
links:
|
# links:
|
||||||
- nightingale:nightingale
|
# - nightingale:nightingale
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
SearXNG_TAG=searxng/searxng:latest
|
SearXNG_TAG=searxng/searxng:latest
|
||||||
Redis_TAG=valkey/valkey:8.1.3-alpine
|
Redis_TAG=valkey/valkey:9.0.0-alpine
|
||||||
Valkey_TAG=valkey/valkey:8.1.3
|
Valkey_TAG=valkey/valkey:9.0.0
|
||||||
Volumes_PATH=/data/volumes/searxng
|
Volumes_PATH=/data/volumes/searxng
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
redis:
|
valkey:
|
||||||
image: ${Redis_TAG}
|
image: ${Valkey_TAG}
|
||||||
container_name: redis
|
container_name: redis
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
command: valkey-server --save 30 1 --loglevel warning
|
command: valkey-server --save 60 1 --loglevel warning
|
||||||
networks:
|
networks:
|
||||||
- searxng
|
- searxng
|
||||||
volumes:
|
volumes:
|
||||||
@@ -19,9 +19,8 @@ services:
|
|||||||
container_name: searxng
|
container_name: searxng
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- valkey
|
||||||
environment:
|
environment:
|
||||||
- SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
|
|
||||||
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
|
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
|
||||||
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
|
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
|
||||||
ports:
|
ports:
|
||||||
@@ -29,7 +28,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- searxng
|
- searxng
|
||||||
volumes:
|
volumes:
|
||||||
- ./searxng:/etc/searxng:rw
|
- ${Volumes_PATH}/etc-searxng:/etc/searxng:rw
|
||||||
- ${Volumes_PATH}/searxng-data:/var/cache/searxng:rw
|
- ${Volumes_PATH}/searxng-data:/var/cache/searxng:rw
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Reference in New Issue
Block a user