部署仓库初始化:epay 部署配置、补丁与插件
- docker-compose.prod.yml:挂载 epay-ui.css/js/head.php 补丁到 staging(镜像升级不丢) - docker/nginx.conf:补丁静态资源 no-cache,改版立即生效 - patches/: - test.php 修复 paytype JSON 对象导致测试支付页空白 - epay-ui.css 后台全屏/侧栏加宽/导航两列布局覆盖 - epay-ui.js 去除页面容器宽度限制 + 侧栏当前菜单自动滚动 - head.php 资源 ?v= 版本号强制回源 - functions.php is_public_url 白名单等既有补丁 - plugins/ 支付插件源码 - .gitignore 排除 .env 等敏感与临时文件
This commit is contained in:
commit
b7613ba082
176 files changed
+47057
No files matched your search
@@ -0,0 +1,107 @@
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: epay-nginx
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${NGINX_PORT:-80}:80"
|
||||
volumes:
|
||||
- ./docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
- app_data:/var/www/html:ro
|
||||
depends_on:
|
||||
php:
|
||||
condition: service_started
|
||||
networks:
|
||||
- epay-network
|
||||
|
||||
php:
|
||||
image: ghcr.io/aliveranme/epay:latest
|
||||
container_name: epay-php
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
DB_HOST: ${DB_HOST:-mysql}
|
||||
DB_PORT: ${DB_PORT:-3306}
|
||||
DB_USER: ${DB_USER:-epay}
|
||||
DB_PASSWORD: ${DB_PASSWORD}
|
||||
DB_NAME: ${DB_NAME:-epay}
|
||||
DB_PREFIX: ${DB_PREFIX:-pay}
|
||||
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
|
||||
SITE_URL: ${SITE_URL:-http://localhost}
|
||||
# 部署自定义配置(可选):API 接口是否校验 timestamp,1=开启(默认),0=关闭(兼容不传 timestamp 的老平台)
|
||||
API_TIMESTAMP_CHECK: ${API_TIMESTAMP_CHECK:-}
|
||||
volumes:
|
||||
- app_data:/var/www/html
|
||||
- ./plugins:/var/www/html/plugins
|
||||
- uploads:/var/www/html/assets/uploads
|
||||
- sessions:/var/lib/php/sessions
|
||||
# 补丁:is_public_url 白名单(容器重启/升级后由 entrypoint 从 staging 自动同步)
|
||||
- ./patches/functions.php:/var/www/html-staging/includes/functions.php:ro
|
||||
# 补丁:后台布局覆盖 CSS(全屏自适应/侧栏加宽/导航两列)
|
||||
- ./patches/epay-ui.css:/var/www/html-staging/assets/dist/epay-ui.css:ro
|
||||
# 补丁:侧栏当前菜单自动滚动脚本
|
||||
- ./patches/epay-ui.js:/var/www/html-staging/assets/dist/epay-ui.js:ro
|
||||
# 补丁:后台入口资源版本号(?v= 强制回源)
|
||||
- ./patches/head.php:/var/www/html-staging/admin/head.php:ro
|
||||
# 补丁:后台改密码存明文(与登录逻辑一致)+ 登录兼容历史 md5 存储
|
||||
- ./patches/admin/set.php:/var/www/html-staging/admin/set.php:ro
|
||||
- ./patches/admin/login.php:/var/www/html-staging/admin/login.php:ro
|
||||
# 补丁:支付页轮询时主动向微信查单(异步回调延迟兜底),重启后由 staging 同步
|
||||
- ./patches/getshop.php:/var/www/html-staging/getshop.php:ro
|
||||
extra_hosts:
|
||||
- "newapi.88531.cn:host-gateway"
|
||||
- "ai.88531.cn:host-gateway"
|
||||
- "pay.88531.cn:host-gateway"
|
||||
networks:
|
||||
- epay-network
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
container_name: epay-mysql
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
|
||||
MYSQL_DATABASE: ${DB_NAME:-epay}
|
||||
MYSQL_USER: ${DB_USER:-epay}
|
||||
MYSQL_PASSWORD: ${DB_PASSWORD}
|
||||
TZ: Asia/Shanghai
|
||||
command:
|
||||
- --character-set-server=utf8mb4
|
||||
- --collation-server=utf8mb4_unicode_ci
|
||||
- --sql-mode=
|
||||
- --default-time-zone=+08:00
|
||||
- --default-authentication-plugin=mysql_native_password
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
networks:
|
||||
- epay-network
|
||||
|
||||
cron:
|
||||
image: alpine:latest
|
||||
container_name: epay-cron
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
nginx:
|
||||
condition: service_started
|
||||
environment:
|
||||
CRON_KEY: ${CRON_KEY}
|
||||
SITE_URL: ${SITE_URL:-http://nginx}
|
||||
entrypoint: |
|
||||
/bin/sh -c '
|
||||
apk add --no-cache curl tzdata;
|
||||
ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime;
|
||||
echo "*/5 * * * * curl -s -o /dev/null -w \"%{http_code}\" $${SITE_URL}/cron.php?key=$${CRON_KEY}" > /etc/crontabs/root;
|
||||
crond -f -l 2
|
||||
'
|
||||
networks:
|
||||
- epay-network
|
||||
|
||||
volumes:
|
||||
app_data:
|
||||
uploads:
|
||||
sessions:
|
||||
mysql_data:
|
||||
|
||||
networks:
|
||||
epay-network:
|
||||
driver: bridge
|
||||
Reference in new issue
Block a user