forked from DevOps/deploy.stack
feat(nginxpulse): add nginxpulse deployment files
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
# ============================================================
|
||||||
|
# nginxpulse 部署 — 公共环境变量模板(不含敏感信息)
|
||||||
|
# 复制为 env.cfg 后填入真实值,env.cfg 已被 .gitignore 忽略
|
||||||
|
# ============================================================
|
||||||
|
#
|
||||||
|
# 使用方式:
|
||||||
|
# cp env.cfg.example env.cfg
|
||||||
|
# $EDITOR env.cfg # 填入真实密码/密钥后保存
|
||||||
|
# docker compose -p nginxpulse --env-file ./nginxpulse/env.cfg -f ./nginxpulse/stack.yml up -d
|
||||||
|
# mkdir -pv /data/volumes/{postgres,nginxpulse}
|
||||||
|
# mkdir -pv /data/volumes/nginxpulse/{logs,nginxpulse_data,configs}
|
||||||
|
#
|
||||||
|
# ============================================================
|
||||||
|
# ⚠️ 敏感值(必填,env.cfg 不提交)
|
||||||
|
# ============================================================
|
||||||
|
|
||||||
|
# --- PostgreSQL ---
|
||||||
|
PG_IMAGE_TAG_VER=18.4
|
||||||
|
PG_IMAGE_TAG_V18=postgres:${PG_IMAGE_TAG_VER}
|
||||||
|
|
||||||
|
POSTGRES_PASSWORD=<your-password>
|
||||||
|
POSTGRES_HOST_AUTH_METHOD=scram-sha-256
|
||||||
|
|
||||||
|
# --- Nginxpulse ---
|
||||||
|
NP_IMAGE_TAG_VER=v1.6.24
|
||||||
|
NP_IMAGE_TAG=magiccoders/nginxpulse:${NP_IMAGE_TAG_VER}
|
||||||
|
|
||||||
|
# --- 卷路径 ---
|
||||||
|
Volumes_Path=/data/volumes
|
||||||
|
PG_Volumes_Path=${Volumes_Path}/postgres
|
||||||
|
NP_Volumes_Path=${Volumes_Path}/nginxpulse
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: ${PG_IMAGE_TAG_V18}
|
||||||
|
container_name: prod-postgres
|
||||||
|
shm_size: 256mb
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD}
|
||||||
|
- POSTGRES_INITDB_ARGS=--auth-host=${POSTGRES_HOST_AUTH_METHOD}
|
||||||
|
- TZ=Asia/Shanghai
|
||||||
|
volumes:
|
||||||
|
- ${PG_Volumes_Path}/data:/var/lib/postgresql
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
restart: unless-stopped
|
||||||
|
nginxpulse:
|
||||||
|
image: ${NP_IMAGE_TAG}
|
||||||
|
container_name: local_nginxpulse
|
||||||
|
ports:
|
||||||
|
- "8088:8088"
|
||||||
|
- "8089:8089"
|
||||||
|
volumes:
|
||||||
|
- ${NP_Volumes_Path}/logs:/share/logs
|
||||||
|
- ${NP_Volumes_Path}/nginxpulse_data:/app/var/nginxpulse_data
|
||||||
|
- ${NP_Volumes_Path}/configs:/app/configs
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
stop_grace_period: 90s
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- TZ=Asia/Shanghai
|
||||||
Reference in New Issue
Block a user