feat(deploy): configure czleilei240 integral shop
Add czleilei240 runtime profiles, frontend domains, contract paths, and Docker deployment updates so the integral shop can run against the Leilei environment. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,8 +10,8 @@ ENV = 'development'
|
|||||||
# VUE_APP_BASE_API = 'http://jfadmin-bsy.bosenyuan.com'
|
# VUE_APP_BASE_API = 'http://jfadmin-bsy.bosenyuan.com'
|
||||||
# shjjy153 项目
|
# shjjy153 项目
|
||||||
# VUE_APP_BASE_API = 'http://jjy-jfadmin.fwxgpt.com'
|
# VUE_APP_BASE_API = 'http://jjy-jfadmin.fwxgpt.com'
|
||||||
# shccd159 项目
|
# czleilei240 项目
|
||||||
VUE_APP_BASE_API = 'http://ccd-jfadmin.fwxgpt.com'
|
VUE_APP_BASE_API = 'https://leilei-jfadmin.czchunfang.com'
|
||||||
|
|
||||||
|
|
||||||
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
||||||
|
|||||||
@@ -15,5 +15,5 @@ ENV = 'production'
|
|||||||
# shjjy153 项目
|
# shjjy153 项目
|
||||||
# VUE_APP_BASE_API = 'http://jjy-jfadmin.fwxgpt.com'
|
# VUE_APP_BASE_API = 'http://jjy-jfadmin.fwxgpt.com'
|
||||||
|
|
||||||
# shccd159 项目
|
# czleilei240 项目
|
||||||
VUE_APP_BASE_API = 'http://ccd-jfadmin.fwxgpt.com'
|
VUE_APP_BASE_API = 'https://leilei-jfadmin.czchunfang.com'
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
# CRMEB 相关配置
|
||||||
|
crmeb:
|
||||||
|
captchaOn: false # 是否开启行为验证码
|
||||||
|
asyncConfig: true #是否同步config表数据到redis
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: 30032
|
||||||
|
|
||||||
|
# 订单同步配置(每个单商户实例需要配置不同的source-id和target-mer-id)
|
||||||
|
sync:
|
||||||
|
source-id: shop_15
|
||||||
|
target-mer-id: 15
|
||||||
|
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
name: yangtangyoupin
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
|
url: jdbc:mysql://rm-bp1a178eq62lxba9xbo.mysql.rds.aliyuncs.com:3306/${spring.datasource.name}?useUnicode=true&serverTimezone=GMT%2B8&characterEncoding=utf8
|
||||||
|
username: yangtangyoupin
|
||||||
|
password: 5Fn8eWrbYFtAhCZw
|
||||||
|
redis:
|
||||||
|
host: 116.62.83.240 #地址
|
||||||
|
port: 6379 #端口
|
||||||
|
password: 'UthinkCloud2017'
|
||||||
|
timeout: 10000 # 连接超时时间(毫秒)
|
||||||
|
database: 25 #默认数据库
|
||||||
|
jedis:
|
||||||
|
pool:
|
||||||
|
max-active: 200 # 连接池最大连接数(使用负值表示没有限制)
|
||||||
|
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-idle: 10 # 连接池中的最大空闲连接
|
||||||
|
min-idle: 0 # 连接池中的最小空闲连接
|
||||||
|
time-between-eviction-runs: -1 #逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1
|
||||||
|
second:
|
||||||
|
database: 25 # 微信accessToken存储库
|
||||||
|
|
||||||
|
debug: true
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
io.swagger.*: error
|
||||||
|
com.zbjk.crmeb: debug
|
||||||
|
org.springframework.boot.autoconfigure: ERROR
|
||||||
|
config: classpath:logback-spring.xml
|
||||||
|
file:
|
||||||
|
path: ./crmeb_log
|
||||||
|
|
||||||
|
# mybatis 配置
|
||||||
|
mybatis-plus:
|
||||||
|
# 配置sql打印日志
|
||||||
|
configuration:
|
||||||
|
log-impl:
|
||||||
|
|
||||||
|
#swagger 配置
|
||||||
|
swagger:
|
||||||
|
basic:
|
||||||
|
enable: true #是否开启界面
|
||||||
|
check: false #是否打开验证
|
||||||
|
username: crmeb #访问swagger的账号
|
||||||
|
password: crmeb.com #访问swagger的密码
|
||||||
@@ -38,7 +38,7 @@ server:
|
|||||||
|
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: miao80
|
active: czleilei240
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 50MB #设置单个文件大小
|
max-file-size: 50MB #设置单个文件大小
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class WaUserController {
|
|||||||
FileInputStream fileInputStream = null;
|
FileInputStream fileInputStream = null;
|
||||||
try {
|
try {
|
||||||
// 读取模板PDF文件
|
// 读取模板PDF文件
|
||||||
Resource resource = new ClassPathResource("pdf/sign33_contract.pdf");
|
Resource resource = new ClassPathResource("pdf/sign_contract_sxsy80.pdf");
|
||||||
InputStream pdfInputStream = resource.getInputStream();
|
InputStream pdfInputStream = resource.getInputStream();
|
||||||
document = PDDocument.load(pdfInputStream);
|
document = PDDocument.load(pdfInputStream);
|
||||||
pdfInputStream.close();
|
pdfInputStream.close();
|
||||||
@@ -197,7 +197,7 @@ public class WaUserController {
|
|||||||
WaUsers user = new WaUsers();
|
WaUsers user = new WaUsers();
|
||||||
user.setId(pid);
|
user.setId(pid);
|
||||||
// user.setContract("https://anyue.szxingming.com/"+pdfResultVo.getUrl());
|
// user.setContract("https://anyue.szxingming.com/"+pdfResultVo.getUrl());
|
||||||
user.setContract("https://xiashengjun.com/"+pdfResultVo.getUrl());
|
user.setContract("https://leilei.czchunfang.com/"+pdfResultVo.getUrl());
|
||||||
waUsersDao.updateById(user);
|
waUsersDao.updateById(user);
|
||||||
}
|
}
|
||||||
return CommonResult.success(pdfResultVo);
|
return CommonResult.success(pdfResultVo);
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
crmeb:
|
||||||
|
imagePath: /www/wwwroot/leilei.czchunfang.com/ # 服务器图片路径配置 斜杠结尾
|
||||||
|
asyncConfig: true #是否同步config表数据到redis
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: 30031
|
||||||
|
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
name: yangtangyoupin
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driver-class-name: com.mysql.jdbc.Driver
|
||||||
|
url: jdbc:mysql://rm-bp1a178eq62lxba9xbo.mysql.rds.aliyuncs.com:3306/${spring.datasource.name}?useUnicode=true&serverTimezone=GMT%2B8&characterEncoding=utf8
|
||||||
|
username: yangtangyoupin
|
||||||
|
password: 5Fn8eWrbYFtAhCZw
|
||||||
|
redis:
|
||||||
|
host: 116.62.83.240 #地址
|
||||||
|
port: 6379 #端口
|
||||||
|
password: 'UthinkCloud2017'
|
||||||
|
timeout: 10000 # 连接超时时间(毫秒)
|
||||||
|
database: 25 #默认数据库
|
||||||
|
jedis:
|
||||||
|
pool:
|
||||||
|
max-active: 200 # 连接池最大连接数(使用负值表示没有限制)
|
||||||
|
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-idle: 10 # 连接池中的最大空闲连接
|
||||||
|
min-idle: 0 # 连接池中的最小空闲连接
|
||||||
|
time-between-eviction-runs: -1 #逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1
|
||||||
|
second:
|
||||||
|
database: 25 # 微信accessToken存储库
|
||||||
|
|
||||||
|
debug: true
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
io.swagger.*: error
|
||||||
|
com.zbjk.crmeb: debug
|
||||||
|
org.springframework.boot.autoconfigure: ERROR
|
||||||
|
config: classpath:logback-spring.xml
|
||||||
|
file:
|
||||||
|
path: ./logs
|
||||||
|
|
||||||
|
# mybatis 配置
|
||||||
|
mybatis-plus:
|
||||||
|
# 配置sql打印日志
|
||||||
|
configuration:
|
||||||
|
log-impl:
|
||||||
|
|
||||||
|
#swagger 配置
|
||||||
|
swagger:
|
||||||
|
basic:
|
||||||
|
enable: true #是否开启界面
|
||||||
|
check: false #是否打开验证
|
||||||
|
username: crmeb #访问swagger的账号
|
||||||
|
password: crmeb.com #访问swagger的密码
|
||||||
@@ -32,7 +32,7 @@ server:
|
|||||||
|
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: miao33
|
active: czleilei240
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 50MB #设置单个文件大小
|
max-file-size: 50MB #设置单个文件大小
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ upstream jifenmall_h5 {
|
|||||||
server
|
server
|
||||||
{
|
{
|
||||||
listen 80;
|
listen 80;
|
||||||
listen 443 ssl;
|
listen 443 ssl http2;
|
||||||
http2 on;
|
|
||||||
server_name leilei-jf.czchunfang.com;
|
server_name leilei-jf.czchunfang.com;
|
||||||
index index.html index.htm default.htm default.html;
|
index index.html index.htm default.htm default.html;
|
||||||
root /www/wwwroot/leilei-jf.czchunfang.com;
|
root /www/wwwroot/leilei-jf.czchunfang.com;
|
||||||
@@ -17,8 +16,6 @@ server
|
|||||||
#CERT-APPLY-CHECK--END
|
#CERT-APPLY-CHECK--END
|
||||||
|
|
||||||
#SSL-START
|
#SSL-START
|
||||||
#error_page 404/404.html;
|
|
||||||
#HTTP_TO_HTTPS_START
|
|
||||||
set $isRedcert 1;
|
set $isRedcert 1;
|
||||||
if ($server_port != 443) {
|
if ($server_port != 443) {
|
||||||
set $isRedcert 2;
|
set $isRedcert 2;
|
||||||
@@ -29,7 +26,6 @@ server
|
|||||||
if ($isRedcert != 1) {
|
if ($isRedcert != 1) {
|
||||||
rewrite ^(/.*)$ https://$host$1 permanent;
|
rewrite ^(/.*)$ https://$host$1 permanent;
|
||||||
}
|
}
|
||||||
#HTTP_TO_HTTPS_END
|
|
||||||
ssl_certificate /www/wwwroot/integral-shop/deploy/docker/ssl-cert/leilei-jf.czchunfang.com_cert/nginx/leilei-jf.czchunfang.com.pem;
|
ssl_certificate /www/wwwroot/integral-shop/deploy/docker/ssl-cert/leilei-jf.czchunfang.com_cert/nginx/leilei-jf.czchunfang.com.pem;
|
||||||
ssl_certificate_key /www/wwwroot/integral-shop/deploy/docker/ssl-cert/leilei-jf.czchunfang.com_cert/nginx/leilei-jf.czchunfang.com.key;
|
ssl_certificate_key /www/wwwroot/integral-shop/deploy/docker/ssl-cert/leilei-jf.czchunfang.com_cert/nginx/leilei-jf.czchunfang.com.key;
|
||||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||||
@@ -46,7 +42,45 @@ server
|
|||||||
include /www/server/panel/vhost/rewrite/html_leilei-jf.czchunfang.com.conf;
|
include /www/server/panel/vhost/rewrite/html_leilei-jf.czchunfang.com.conf;
|
||||||
#REWRITE-END
|
#REWRITE-END
|
||||||
|
|
||||||
# 积分商城 H5 → Docker single-h5 容器(uni-app SPA)
|
# ---------- API 直连 Docker 容器(不经 H5 Nginx 中转) ----------
|
||||||
|
|
||||||
|
# 前台 API(用户端)→ single-front-api 容器 30033
|
||||||
|
location /api/front {
|
||||||
|
proxy_pass http://127.0.0.1:30033/api/front;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_read_timeout 120s;
|
||||||
|
client_max_body_size 50m;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 管理后台 API → single-admin-api 容器 30032
|
||||||
|
location /api/admin {
|
||||||
|
proxy_pass http://127.0.0.1:30032/api/admin;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_read_timeout 120s;
|
||||||
|
client_max_body_size 50m;
|
||||||
|
}
|
||||||
|
|
||||||
|
# 外部接口(同 admin-api)
|
||||||
|
location /api/external {
|
||||||
|
proxy_pass http://127.0.0.1:30032/api/external;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_read_timeout 120s;
|
||||||
|
client_max_body_size 50m;
|
||||||
|
}
|
||||||
|
|
||||||
|
# ---------- H5 前端静态文件 → Docker single-h5 容器 ----------
|
||||||
location ^~ / {
|
location ^~ / {
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ upstream jifenmall_admin {
|
|||||||
server
|
server
|
||||||
{
|
{
|
||||||
listen 80;
|
listen 80;
|
||||||
listen 443 ssl;
|
listen 443 ssl http2;
|
||||||
http2 on;
|
|
||||||
server_name leilei-jfadmin.czchunfang.com;
|
server_name leilei-jfadmin.czchunfang.com;
|
||||||
index index.html index.htm default.htm default.html;
|
index index.html index.htm default.htm default.html;
|
||||||
root /www/wwwroot/leilei-jfadmin.czchunfang.com;
|
root /www/wwwroot/leilei-jfadmin.czchunfang.com;
|
||||||
@@ -17,8 +16,6 @@ server
|
|||||||
#CERT-APPLY-CHECK--END
|
#CERT-APPLY-CHECK--END
|
||||||
|
|
||||||
#SSL-START
|
#SSL-START
|
||||||
#error_page 404/404.html;
|
|
||||||
#HTTP_TO_HTTPS_START
|
|
||||||
set $isRedcert 1;
|
set $isRedcert 1;
|
||||||
if ($server_port != 443) {
|
if ($server_port != 443) {
|
||||||
set $isRedcert 2;
|
set $isRedcert 2;
|
||||||
@@ -29,7 +26,6 @@ server
|
|||||||
if ($isRedcert != 1) {
|
if ($isRedcert != 1) {
|
||||||
rewrite ^(/.*)$ https://$host$1 permanent;
|
rewrite ^(/.*)$ https://$host$1 permanent;
|
||||||
}
|
}
|
||||||
#HTTP_TO_HTTPS_END
|
|
||||||
ssl_certificate /www/wwwroot/integral-shop/deploy/docker/ssl-cert/leilei-jfadmin.czchunfang.com_cert/nginx/leilei-jfadmin.czchunfang.com.pem;
|
ssl_certificate /www/wwwroot/integral-shop/deploy/docker/ssl-cert/leilei-jfadmin.czchunfang.com_cert/nginx/leilei-jfadmin.czchunfang.com.pem;
|
||||||
ssl_certificate_key /www/wwwroot/integral-shop/deploy/docker/ssl-cert/leilei-jfadmin.czchunfang.com_cert/nginx/leilei-jfadmin.czchunfang.com.key;
|
ssl_certificate_key /www/wwwroot/integral-shop/deploy/docker/ssl-cert/leilei-jfadmin.czchunfang.com_cert/nginx/leilei-jfadmin.czchunfang.com.key;
|
||||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||||
@@ -46,7 +42,8 @@ server
|
|||||||
include /www/server/panel/vhost/rewrite/html_leilei-jfadmin.czchunfang.com.conf;
|
include /www/server/panel/vhost/rewrite/html_leilei-jfadmin.czchunfang.com.conf;
|
||||||
#REWRITE-END
|
#REWRITE-END
|
||||||
|
|
||||||
# 积分商城管理后台 → Docker single-admin-web 容器(Vue SPA)
|
# ---------- 管理后台静态文件 → Docker single-admin-web 容器 ----------
|
||||||
|
# 管理后台前端调用的 API 指向 leilei-jf.czchunfang.com(与 H5 共用 API 域名)
|
||||||
location ^~ / {
|
location ^~ / {
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
|||||||
@@ -1,31 +1,34 @@
|
|||||||
# =============================================================
|
# =============================================================
|
||||||
# 寄卖商城 管理后台 API (miao-admin-2.2.jar)
|
# 积分商城 管理端 API(miao-admin-2.2.jar)
|
||||||
# build context = single-shop-22/backend
|
# JAR 由宿主机 bind-mount 进来(/app/app.jar),无需 Maven 编译
|
||||||
# 对应宿主机启动命令:
|
# 宿主机路径:${SINGLE_ADMIN_JAR} → /app/app.jar
|
||||||
# nohup java -Xms128m -Xmx256m -jar miao-admin-2.2.jar > admin.log &
|
# FTP 更新 JAR 后:docker compose --env-file .env restart single-admin-api
|
||||||
# =============================================================
|
# =============================================================
|
||||||
# syntax=docker/dockerfile:1.6
|
|
||||||
|
|
||||||
FROM maven:3.8.8-eclipse-temurin-17 AS builder
|
|
||||||
WORKDIR /src
|
|
||||||
COPY pom.xml ./
|
|
||||||
COPY crmeb-common/pom.xml crmeb-common/pom.xml
|
|
||||||
COPY crmeb-service/pom.xml crmeb-service/pom.xml
|
|
||||||
COPY crmeb-admin/pom.xml crmeb-admin/pom.xml
|
|
||||||
COPY crmeb-front/pom.xml crmeb-front/pom.xml
|
|
||||||
RUN mvn -B -pl crmeb-admin -am dependency:go-offline -DskipTests || true
|
|
||||||
COPY . .
|
|
||||||
RUN mvn -B clean package -pl crmeb-admin -am -DskipTests
|
|
||||||
|
|
||||||
FROM eclipse-temurin:17-jre-jammy
|
FROM eclipse-temurin:17-jre-jammy
|
||||||
ENV TZ=Asia/Shanghai \
|
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
|
||||||
LANG=C.UTF-8 LC_ALL=C.UTF-8
|
|
||||||
|
|
||||||
# 堆大小:可通过 compose 的 JAVA_HEAP_OPTS 覆盖
|
ENV TZ=Asia/Shanghai \
|
||||||
|
LANG=C.UTF-8 LC_ALL=C.UTF-8 \
|
||||||
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# 切换阿里云 Ubuntu 镜像源(服务器访问 archive.ubuntu.com 超时)
|
||||||
|
RUN sed -i \
|
||||||
|
-e 's|http://archive.ubuntu.com|https://mirrors.aliyun.com|g' \
|
||||||
|
-e 's|http://security.ubuntu.com|https://mirrors.aliyun.com|g' \
|
||||||
|
/etc/apt/sources.list
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
tzdata ca-certificates curl \
|
||||||
|
fontconfig fonts-dejavu fonts-wqy-zenhei \
|
||||||
|
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
|
||||||
|
&& echo $TZ > /etc/timezone \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& mkdir -p /app /config /usr/local/crmeb/crmebimage /app/log
|
||||||
|
|
||||||
|
# 堆大小(可通过 compose environment 覆盖)
|
||||||
ENV JAVA_HEAP_OPTS="-Xms128m -Xmx256m"
|
ENV JAVA_HEAP_OPTS="-Xms128m -Xmx256m"
|
||||||
|
|
||||||
# Spring Boot 2.2.6 + Java 17 必须的模块开放参数(固定,不允许 compose 覆盖)
|
# Spring Boot 2.2.6 + Java 17 必须的模块开放参数
|
||||||
ENV JAVA_MODULE_OPTS="\
|
ENV JAVA_MODULE_OPTS="\
|
||||||
--add-opens java.base/java.lang=ALL-UNNAMED \
|
--add-opens java.base/java.lang=ALL-UNNAMED \
|
||||||
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
|
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
|
||||||
@@ -35,22 +38,11 @@ ENV JAVA_MODULE_OPTS="\
|
|||||||
--add-opens java.base/sun.net.util=ALL-UNNAMED \
|
--add-opens java.base/sun.net.util=ALL-UNNAMED \
|
||||||
--add-opens java.base/java.net=ALL-UNNAMED"
|
--add-opens java.base/java.net=ALL-UNNAMED"
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
tzdata ca-certificates curl \
|
|
||||||
fontconfig fonts-dejavu fonts-wqy-zenhei \
|
|
||||||
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
|
|
||||||
&& echo $TZ > /etc/timezone \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& mkdir -p /app /config /usr/local/crmeb/crmebimage /app/log
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /src/crmeb-admin/target/miao-admin-2.2.jar /app/app.jar
|
# /app/app.jar 由 docker-compose volumes bind-mount 进来
|
||||||
|
|
||||||
EXPOSE 30032
|
EXPOSE 30032
|
||||||
|
|
||||||
# 等价于:nohup java -Xms128m -Xmx256m -jar miao-admin-2.2.jar > admin.log &
|
# 等价于:nohup java -Xms128m -Xmx256m -jar miao-admin-2.2.jar > admin.log &
|
||||||
# 日志直接输出到容器 stdout,docker logs 可查看
|
|
||||||
ENTRYPOINT ["sh","-c","exec java \
|
ENTRYPOINT ["sh","-c","exec java \
|
||||||
$JAVA_HEAP_OPTS \
|
$JAVA_HEAP_OPTS \
|
||||||
$JAVA_MODULE_OPTS \
|
$JAVA_MODULE_OPTS \
|
||||||
|
|||||||
@@ -1,38 +1,24 @@
|
|||||||
# =============================================================
|
# =============================================================
|
||||||
# 寄卖商城 管理后台前端 (Vue 2 / Vue CLI 4)
|
# 积分商城 管理后台前端(Vue 2 SPA)
|
||||||
# build context = single-shop-22/backend-adminend
|
# 纯 Nginx 运行时镜像,不含 Node 构建阶段
|
||||||
# 多阶段: Node 构建 -> Nginx 运行;可通过 ARG VUE_APP_BASE_API 注入 API 域名
|
# 静态文件由宿主机 bind-mount 进来(${SINGLE_ADMIN_WEB_DIR}:/usr/share/nginx/html)
|
||||||
#
|
# 宿主机目录示例:/www/wwwroot/leilei-jfadmin.czchunfang.com/
|
||||||
# 想直接使用源码里已有的 dist/: 用 --target=fast 构建
|
# 更新方式:rsync 新 dist 到宿主机目录 → 无需重建镜像
|
||||||
# =============================================================
|
# =============================================================
|
||||||
# syntax=docker/dockerfile:1.6
|
|
||||||
|
|
||||||
# ---------- 构建阶段(默认) ----------
|
FROM nginx:1.25-alpine
|
||||||
FROM node:16-alpine AS builder
|
|
||||||
|
|
||||||
# 留空(默认)→ 浏览器走与 nginx 同域的 /api/;填具体 URL 则直连后端
|
|
||||||
ARG VUE_APP_BASE_API=""
|
|
||||||
ENV NODE_OPTIONS=--openssl-legacy-provider \
|
|
||||||
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
COPY package.json yarn.lock* package-lock.json* ./
|
|
||||||
RUN (yarn install --frozen-lockfile 2>/dev/null) || npm ci || npm install --legacy-peer-deps
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
# 覆盖 .env.production,使用 build arg
|
|
||||||
RUN printf "ENV='production'\nVUE_APP_BASE_API=%s\n" "$VUE_APP_BASE_API" > .env.production \
|
|
||||||
&& npm run build:prod
|
|
||||||
|
|
||||||
# ---------- 运行阶段 ----------
|
|
||||||
FROM nginx:1.25-alpine AS runtime
|
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
RUN apk add --no-cache tzdata \
|
|
||||||
|
# 切换阿里云 Alpine 镜像源
|
||||||
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
||||||
|
&& apk add --no-cache tzdata \
|
||||||
&& cp /usr/share/zoneinfo/$TZ /etc/localtime \
|
&& cp /usr/share/zoneinfo/$TZ /etc/localtime \
|
||||||
&& echo $TZ > /etc/timezone
|
&& echo $TZ > /etc/timezone \
|
||||||
|
&& rm -f /etc/apk/cache/*.apk
|
||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
||||||
|
|
||||||
|
# Nginx 反代配置
|
||||||
|
# /api/ 和 /adminapi/ 代理到 single-admin-api 容器
|
||||||
RUN cat > /etc/nginx/conf.d/default.conf <<'NGX'
|
RUN cat > /etc/nginx/conf.d/default.conf <<'NGX'
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
@@ -48,7 +34,6 @@ server {
|
|||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
# 反代到管理后台 API
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://single-admin-api:30032/api/;
|
proxy_pass http://single-admin-api:30032/api/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
@@ -60,7 +45,6 @@ server {
|
|||||||
client_max_body_size 50m;
|
client_max_body_size 50m;
|
||||||
}
|
}
|
||||||
|
|
||||||
# CRMEB 部分接口直接命中 /adminapi (兼容)
|
|
||||||
location /adminapi/ {
|
location /adminapi/ {
|
||||||
proxy_pass http://single-admin-api:30032/adminapi/;
|
proxy_pass http://single-admin-api:30032/adminapi/;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
@@ -75,14 +59,3 @@ server {
|
|||||||
NGX
|
NGX
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# ---------- 备选: 直接复用源码已构建的 dist/(fast 模式) ----------
|
|
||||||
# 构建命令: docker compose build --target fast single-admin-web
|
|
||||||
FROM nginx:1.25-alpine AS fast
|
|
||||||
ENV TZ=Asia/Shanghai
|
|
||||||
RUN apk add --no-cache tzdata \
|
|
||||||
&& cp /usr/share/zoneinfo/$TZ /etc/localtime \
|
|
||||||
&& echo $TZ > /etc/timezone
|
|
||||||
COPY dist/ /usr/share/nginx/html
|
|
||||||
COPY --from=runtime /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
|
||||||
EXPOSE 80
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
# =============================================================
|
# =============================================================
|
||||||
# 寄卖商城 Docker 部署专用 Spring profile
|
# 积分商城 Docker 部署专用 Spring profile
|
||||||
# 通过 --spring.config.additional-location=file:/config/ + --spring.profiles.active=docker
|
# 通过 --spring.config.additional-location=file:/config/ + --spring.profiles.active=docker
|
||||||
# 加载本文件,并由环境变量覆盖关键参数
|
# 加载本文件,并由环境变量覆盖关键参数
|
||||||
# =============================================================
|
# =============================================================
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: ${SERVER_PORT:30032}
|
port: ${SERVER_PORT:-30032}
|
||||||
|
|
||||||
crmeb:
|
crmeb:
|
||||||
imagePath: /usr/local/crmeb/crmebimage/
|
imagePath: /usr/local/crmeb/crmebimage/
|
||||||
@@ -43,6 +43,8 @@ spring:
|
|||||||
max-idle: 10
|
max-idle: 10
|
||||||
min-idle: 0
|
min-idle: 0
|
||||||
time-between-eviction-runs: -1
|
time-between-eviction-runs: -1
|
||||||
|
second:
|
||||||
|
database: ${REDIS_SECOND_DATABASE:1}
|
||||||
|
|
||||||
# 订单同步(无 MER 时填默认)
|
# 订单同步(无 MER 时填默认)
|
||||||
sync:
|
sync:
|
||||||
|
|||||||
@@ -1,31 +1,34 @@
|
|||||||
# =============================================================
|
# =============================================================
|
||||||
# 寄卖商城 用户端 API (miao-front-2.2.jar)
|
# 积分商城 用户端 API(miao-front-2.2.jar)
|
||||||
# build context = single-shop-22/backend
|
# JAR 由宿主机 bind-mount 进来(/app/app.jar),无需 Maven 编译
|
||||||
# 对应宿主机启动命令:
|
# 宿主机路径:${SINGLE_FRONT_JAR} → /app/app.jar
|
||||||
# nohup java -Xms128m -Xmx256m -jar miao-front-2.2.jar > front.log &
|
# FTP 更新 JAR 后:docker compose --env-file .env restart single-front-api
|
||||||
# =============================================================
|
# =============================================================
|
||||||
# syntax=docker/dockerfile:1.6
|
|
||||||
|
|
||||||
FROM maven:3.8.8-eclipse-temurin-17 AS builder
|
|
||||||
WORKDIR /src
|
|
||||||
COPY pom.xml ./
|
|
||||||
COPY crmeb-common/pom.xml crmeb-common/pom.xml
|
|
||||||
COPY crmeb-service/pom.xml crmeb-service/pom.xml
|
|
||||||
COPY crmeb-admin/pom.xml crmeb-admin/pom.xml
|
|
||||||
COPY crmeb-front/pom.xml crmeb-front/pom.xml
|
|
||||||
RUN mvn -B -pl crmeb-front -am dependency:go-offline -DskipTests || true
|
|
||||||
COPY . .
|
|
||||||
RUN mvn -B clean package -pl crmeb-front -am -DskipTests
|
|
||||||
|
|
||||||
FROM eclipse-temurin:17-jre-jammy
|
FROM eclipse-temurin:17-jre-jammy
|
||||||
ENV TZ=Asia/Shanghai \
|
|
||||||
DEBIAN_FRONTEND=noninteractive \
|
|
||||||
LANG=C.UTF-8 LC_ALL=C.UTF-8
|
|
||||||
|
|
||||||
# 堆大小:可通过 compose 的 JAVA_HEAP_OPTS 覆盖
|
ENV TZ=Asia/Shanghai \
|
||||||
|
LANG=C.UTF-8 LC_ALL=C.UTF-8 \
|
||||||
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# 切换阿里云 Ubuntu 镜像源(服务器访问 archive.ubuntu.com 超时)
|
||||||
|
RUN sed -i \
|
||||||
|
-e 's|http://archive.ubuntu.com|https://mirrors.aliyun.com|g' \
|
||||||
|
-e 's|http://security.ubuntu.com|https://mirrors.aliyun.com|g' \
|
||||||
|
/etc/apt/sources.list
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
tzdata ca-certificates curl \
|
||||||
|
fontconfig fonts-dejavu fonts-wqy-zenhei \
|
||||||
|
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
|
||||||
|
&& echo $TZ > /etc/timezone \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& mkdir -p /app /config /usr/local/crmeb/crmebimage /app/log
|
||||||
|
|
||||||
|
# 堆大小(可通过 compose environment 覆盖)
|
||||||
ENV JAVA_HEAP_OPTS="-Xms128m -Xmx256m"
|
ENV JAVA_HEAP_OPTS="-Xms128m -Xmx256m"
|
||||||
|
|
||||||
# Spring Boot 2.2.6 + Java 17 必须的模块开放参数(固定,不允许 compose 覆盖)
|
# Spring Boot 2.2.6 + Java 17 必须的模块开放参数
|
||||||
ENV JAVA_MODULE_OPTS="\
|
ENV JAVA_MODULE_OPTS="\
|
||||||
--add-opens java.base/java.lang=ALL-UNNAMED \
|
--add-opens java.base/java.lang=ALL-UNNAMED \
|
||||||
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
|
--add-opens java.base/java.lang.reflect=ALL-UNNAMED \
|
||||||
@@ -35,22 +38,11 @@ ENV JAVA_MODULE_OPTS="\
|
|||||||
--add-opens java.base/sun.net.util=ALL-UNNAMED \
|
--add-opens java.base/sun.net.util=ALL-UNNAMED \
|
||||||
--add-opens java.base/java.net=ALL-UNNAMED"
|
--add-opens java.base/java.net=ALL-UNNAMED"
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
tzdata ca-certificates curl \
|
|
||||||
fontconfig fonts-dejavu fonts-wqy-zenhei \
|
|
||||||
&& ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
|
|
||||||
&& echo $TZ > /etc/timezone \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& mkdir -p /app /config /usr/local/crmeb/crmebimage /app/log
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /src/crmeb-front/target/miao-front-2.2.jar /app/app.jar
|
# /app/app.jar 由 docker-compose volumes bind-mount 进来
|
||||||
|
EXPOSE 30033
|
||||||
EXPOSE 30031
|
|
||||||
|
|
||||||
# 等价于:nohup java -Xms128m -Xmx256m -jar miao-front-2.2.jar > front.log &
|
# 等价于:nohup java -Xms128m -Xmx256m -jar miao-front-2.2.jar > front.log &
|
||||||
# 日志直接输出到容器 stdout,docker logs 可查看
|
|
||||||
ENTRYPOINT ["sh","-c","exec java \
|
ENTRYPOINT ["sh","-c","exec java \
|
||||||
$JAVA_HEAP_OPTS \
|
$JAVA_HEAP_OPTS \
|
||||||
$JAVA_MODULE_OPTS \
|
$JAVA_MODULE_OPTS \
|
||||||
@@ -59,4 +51,4 @@ ENTRYPOINT ["sh","-c","exec java \
|
|||||||
-jar /app/app.jar \
|
-jar /app/app.jar \
|
||||||
--spring.profiles.active=${SPRING_PROFILES_ACTIVE:-docker} \
|
--spring.profiles.active=${SPRING_PROFILES_ACTIVE:-docker} \
|
||||||
--spring.config.additional-location=file:/config/ \
|
--spring.config.additional-location=file:/config/ \
|
||||||
--server.port=${SERVER_PORT:-30031}"]
|
--server.port=${SERVER_PORT:-30033}"]
|
||||||
|
|||||||
@@ -1,50 +1,24 @@
|
|||||||
# =============================================================
|
# =============================================================
|
||||||
# 寄卖商城 用户端 H5 (uni-app)
|
# 积分商城 用户端 H5(uni-app SPA)
|
||||||
# build context = single-shop-22/single_uniapp22miao
|
# 纯 Nginx 运行时镜像,不含 Node 构建阶段
|
||||||
# 多阶段: Node 构建 H5 -> Nginx 运行
|
# 静态文件由宿主机 bind-mount 进来(${SINGLE_H5_DIR}:/usr/share/nginx/html)
|
||||||
# 通过 ARG H5_API_DOMAIN 注入 API 域名(留空走同域 /api/)
|
# 宿主机目录示例:/www/wwwroot/leilei-jf.czchunfang.com/
|
||||||
#
|
# 更新方式:rsync 新 dist 到宿主机目录 → 无需重建镜像
|
||||||
# 直接复用源码已构建产物: 用 --target=fast 构建
|
|
||||||
# =============================================================
|
# =============================================================
|
||||||
# syntax=docker/dockerfile:1.6
|
|
||||||
|
|
||||||
# ---------- 构建阶段 ----------
|
FROM nginx:1.25-alpine
|
||||||
FROM node:16-alpine AS builder
|
|
||||||
ARG H5_API_DOMAIN=""
|
|
||||||
ENV NODE_OPTIONS=--openssl-legacy-provider \
|
|
||||||
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
COPY package.json package-lock.json* ./
|
|
||||||
RUN npm install --legacy-peer-deps
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# 重写 config/app.js 中的 domain
|
|
||||||
# 留空时使用同域: let domain = ''
|
|
||||||
RUN sed -i -E "s|^let[[:space:]]+domain[[:space:]]*=.*|let domain = '${H5_API_DOMAIN}'|" config/app.js \
|
|
||||||
&& sed -i -E "s|HTTP_H5_URL:[[:space:]]*'[^']*'|HTTP_H5_URL: '${H5_API_DOMAIN}'|" config/app.js \
|
|
||||||
&& cat config/app.js
|
|
||||||
|
|
||||||
RUN npm run build:h5
|
|
||||||
|
|
||||||
# uni-app 默认产物路径
|
|
||||||
# unpackage/dist/build/h5 (Vue CLI Plugin uni 旧版: unpackage/dist/build/web)
|
|
||||||
|
|
||||||
# ---------- 运行阶段 ----------
|
|
||||||
FROM nginx:1.25-alpine AS runtime
|
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
RUN apk add --no-cache tzdata \
|
|
||||||
|
# 切换阿里云 Alpine 镜像源
|
||||||
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
||||||
|
&& apk add --no-cache tzdata \
|
||||||
&& cp /usr/share/zoneinfo/$TZ /etc/localtime \
|
&& cp /usr/share/zoneinfo/$TZ /etc/localtime \
|
||||||
&& echo $TZ > /etc/timezone
|
&& echo $TZ > /etc/timezone \
|
||||||
|
&& rm -f /etc/apk/cache/*.apk
|
||||||
COPY --from=builder /app/unpackage/dist/build/ /tmp/h5build/
|
|
||||||
# 兼容两种输出目录名 h5/ 或 web/
|
|
||||||
RUN if [ -d /tmp/h5build/h5 ]; then cp -r /tmp/h5build/h5/. /usr/share/nginx/html/; \
|
|
||||||
elif [ -d /tmp/h5build/web ]; then cp -r /tmp/h5build/web/. /usr/share/nginx/html/; \
|
|
||||||
else echo "未找到 h5 / web 产物"; exit 1; fi \
|
|
||||||
&& rm -rf /tmp/h5build
|
|
||||||
|
|
||||||
|
# Nginx 反代配置
|
||||||
|
# API 请求代理到 single-front-api 容器(Docker 内网,不经宝塔 Nginx)
|
||||||
RUN cat > /etc/nginx/conf.d/default.conf <<'NGX'
|
RUN cat > /etc/nginx/conf.d/default.conf <<'NGX'
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
@@ -60,8 +34,9 @@ server {
|
|||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 前台 API(单点登录/商品/订单等)
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass http://single-front-api:30031/api/;
|
proxy_pass http://single-front-api:30033/api/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
@@ -78,19 +53,3 @@ server {
|
|||||||
NGX
|
NGX
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
# ---------- 备选: 直接复用源码已构建的 unpackage/dist/build/h5 ----------
|
|
||||||
# 构建: docker compose build --target fast single-h5
|
|
||||||
FROM nginx:1.25-alpine AS fast
|
|
||||||
ENV TZ=Asia/Shanghai
|
|
||||||
RUN apk add --no-cache tzdata \
|
|
||||||
&& cp /usr/share/zoneinfo/$TZ /etc/localtime \
|
|
||||||
&& echo $TZ > /etc/timezone
|
|
||||||
|
|
||||||
COPY unpackage/dist/build/ /tmp/h5build/
|
|
||||||
RUN if [ -d /tmp/h5build/h5 ]; then cp -r /tmp/h5build/h5/. /usr/share/nginx/html/; \
|
|
||||||
elif [ -d /tmp/h5build/web ]; then cp -r /tmp/h5build/web/. /usr/share/nginx/html/; \
|
|
||||||
else echo "未找到 h5 / web 产物"; exit 1; fi \
|
|
||||||
&& rm -rf /tmp/h5build
|
|
||||||
COPY --from=runtime /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
|
||||||
EXPOSE 80
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# =============================================================
|
# =============================================================
|
||||||
# 步骤二:积分商城环境变量 — 池州雷蕾商贸 czleilei240
|
# 步骤二:积分商城环境变量 — 池州雷蕾商贸 czleilei240
|
||||||
# cp .env.example .env 并填入真实密码
|
# 使用方法:cp .env.example .env 然后填入真实密码
|
||||||
# .env 不入库
|
# .env 不入库(已加入 .gitignore)
|
||||||
# =============================================================
|
# =============================================================
|
||||||
|
|
||||||
TZ=Asia/Shanghai
|
TZ=Asia/Shanghai
|
||||||
@@ -15,23 +15,30 @@ RDS_DB=yangtangyoupin
|
|||||||
RDS_USER=yangtangyoupin
|
RDS_USER=yangtangyoupin
|
||||||
RDS_PASSWORD=change-me
|
RDS_PASSWORD=change-me
|
||||||
|
|
||||||
# ---------- 积分商城 admin web 打包目标 URL ----------
|
|
||||||
# VUE_APP_BASE_API(backend-adminend 打包时注入,指向 single-shop-22 admin-api)
|
|
||||||
SINGLE_ADMIN_API_PUBLIC_URL=https://leilei-jf.czchunfang.com
|
|
||||||
|
|
||||||
# ---------- 积分商城 H5 打包目标 URL ----------
|
|
||||||
# H5_API_DOMAIN(uni-app 打包时注入 config/app.js,指向 single-shop-22 front-api)
|
|
||||||
SINGLE_FRONT_API_PUBLIC_URL=https://leilei-jf.czchunfang.com
|
|
||||||
|
|
||||||
# ---------- 订单同步(多商户 source / target) ----------
|
# ---------- 订单同步(多商户 source / target) ----------
|
||||||
SYNC_SOURCE_ID=shop_15
|
SYNC_SOURCE_ID=shop_15
|
||||||
SYNC_TARGET_MER_ID=15
|
SYNC_TARGET_MER_ID=15
|
||||||
|
|
||||||
# ---------- 图片/PDF 目录(与步骤一 H5 Nginx 共享宿主机路径)----------
|
# ---------- Java JAR 宿主机路径(FTP 更新后 restart 容器即可) ----------
|
||||||
|
# 对应宿主机原启动命令目录:/www/wwwroot/javaapi/
|
||||||
|
SINGLE_FRONT_JAR=/www/wwwroot/javaapi/miao-front-2.2.jar
|
||||||
|
SINGLE_ADMIN_JAR=/www/wwwroot/javaapi/miao-admin-2.2.jar
|
||||||
|
|
||||||
|
# ---------- Java 日志目录(bind-mount 到宿主机,直接 tail -f 查看) ----------
|
||||||
|
SINGLE_FRONT_LOG_DIR=/www/wwwroot/javaapi/logs/front
|
||||||
|
SINGLE_ADMIN_LOG_DIR=/www/wwwroot/javaapi/logs/admin
|
||||||
|
|
||||||
|
# ---------- 图片/PDF 目录(与步骤一 H5 Nginx 共享宿主机路径) ----------
|
||||||
# Java 后端写入 /usr/local/crmeb/crmebimage/ → 宿主机 /www/wwwroot/leilei.czchunfang.com/crmebimage/
|
# Java 后端写入 /usr/local/crmeb/crmebimage/ → 宿主机 /www/wwwroot/leilei.czchunfang.com/crmebimage/
|
||||||
# 步骤一的 H5 Nginx 从 /www/wwwroot/leilei.czchunfang.com/ 对外提供访问
|
# 步骤一的 H5 Nginx(leilei.czchunfang.com)提供对外访问
|
||||||
CRMEB_IMAGE_DIR=/www/wwwroot/leilei.czchunfang.com/crmebimage
|
CRMEB_IMAGE_DIR=/www/wwwroot/leilei.czchunfang.com/crmebimage
|
||||||
|
|
||||||
# ---------- 宿主机暴露端口 ----------
|
# ---------- 前端静态目录(bind-mount,rsync 更新后立即生效) ----------
|
||||||
|
# 积分商城 H5(uni-app SPA),对应域名 leilei-jf.czchunfang.com
|
||||||
|
SINGLE_H5_DIR=/www/wwwroot/leilei-jf.czchunfang.com
|
||||||
|
# 积分商城管理后台(Vue SPA),对应域名 leilei-jfadmin.czchunfang.com
|
||||||
|
SINGLE_ADMIN_WEB_DIR=/www/wwwroot/leilei-jfadmin.czchunfang.com
|
||||||
|
|
||||||
|
# ---------- 宿主机暴露端口(供宝塔 Nginx 反代) ----------
|
||||||
SINGLE_ADMIN_PORT=18081
|
SINGLE_ADMIN_PORT=18081
|
||||||
SINGLE_H5_PORT=18082
|
SINGLE_H5_PORT=18082
|
||||||
|
|||||||
@@ -8,6 +8,51 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 部署前提:宿主机文件准备
|
||||||
|
|
||||||
|
> JAR 和静态文件通过 **bind-mount** 挂入容器,部署前需先把文件放到宿主机对应目录。
|
||||||
|
|
||||||
|
### 1. Java JAR(Spring Boot API)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 宿主机目录
|
||||||
|
mkdir -p /www/wwwroot/javaapi/logs/front
|
||||||
|
mkdir -p /www/wwwroot/javaapi/logs/admin
|
||||||
|
|
||||||
|
# 将本地编译好的 JAR 传到服务器(macOS 本地执行)
|
||||||
|
scp single-shop-22/backend/crmeb-front/target/miao-front-2.2.jar root@116.62.83.240:/www/wwwroot/javaapi/
|
||||||
|
scp single-shop-22/backend/crmeb-admin/target/miao-admin-2.2.jar root@116.62.83.240:/www/wwwroot/javaapi/
|
||||||
|
```
|
||||||
|
|
||||||
|
> 更新 JAR:FTP 替换宿主机文件 → `docker compose --env-file .env restart single-front-api`
|
||||||
|
|
||||||
|
### 2. 前端静态文件
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# H5(uni-app)
|
||||||
|
mkdir -p /www/wwwroot/leilei-jf.czchunfang.com
|
||||||
|
rsync -a --delete single-shop-22/single_uniapp22miao/unpackage/dist/build/h5/ \
|
||||||
|
root@116.62.83.240:/www/wwwroot/leilei-jf.czchunfang.com/
|
||||||
|
chmod -R 755 /www/wwwroot/leilei-jf.czchunfang.com/
|
||||||
|
|
||||||
|
# 管理后台(Vue)
|
||||||
|
mkdir -p /www/wwwroot/leilei-jfadmin.czchunfang.com
|
||||||
|
rsync -a --delete single-shop-22/backend-adminend/dist/ \
|
||||||
|
root@116.62.83.240:/www/wwwroot/leilei-jfadmin.czchunfang.com/
|
||||||
|
chmod -R 755 /www/wwwroot/leilei-jfadmin.czchunfang.com/
|
||||||
|
```
|
||||||
|
|
||||||
|
> 更新前端:rsync 同步到宿主机 → 浏览器强刷即可,无需重建镜像或重启容器
|
||||||
|
|
||||||
|
### 3. 图片/PDF 目录
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 与步骤一 H5 Nginx 共享,步骤一已创建则无需重建
|
||||||
|
mkdir -p /www/wwwroot/leilei.czchunfang.com/crmebimage
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 快速部署
|
## 快速部署
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -17,17 +62,18 @@ cd deploy/docker/step2-single-shop
|
|||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
vim .env # 填入 RDS_PASSWORD、REDIS_PASSWORD
|
vim .env # 填入 RDS_PASSWORD、REDIS_PASSWORD
|
||||||
|
|
||||||
# 2. 全量构建并启动(首次,会编译 Java jar + 打包前端)
|
# 2. 构建镜像(仅 JRE + Nginx,无 Maven/Node,约 2-5 分钟)
|
||||||
docker compose --env-file .env up -d --build
|
docker compose --env-file .env build
|
||||||
|
|
||||||
# 3. 查看状态
|
# 3. 启动所有服务
|
||||||
|
docker compose --env-file .env up -d
|
||||||
|
|
||||||
|
# 4. 查看状态
|
||||||
docker compose --env-file .env ps
|
docker compose --env-file .env ps
|
||||||
docker compose --env-file .env logs -f single-front-api
|
docker compose --env-file .env logs -f single-front-api
|
||||||
docker compose --env-file .env logs -f single-admin-api
|
docker compose --env-file .env logs -f single-admin-api
|
||||||
```
|
```
|
||||||
|
|
||||||
> ⚠️ Java 构建需要从 Maven Central 下载依赖,首次约需 10-20 分钟,请耐心等待。
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 域名与端口
|
## 域名与端口
|
||||||
@@ -37,7 +83,8 @@ docker compose --env-file .env logs -f single-admin-api
|
|||||||
| `leilei-jf.czchunfang.com` | 积分商城 H5(uni-app) | **18082** |
|
| `leilei-jf.czchunfang.com` | 积分商城 H5(uni-app) | **18082** |
|
||||||
| `leilei-jfadmin.czchunfang.com` | 积分商城管理后台(Vue) | **18081** |
|
| `leilei-jfadmin.czchunfang.com` | 积分商城管理后台(Vue) | **18081** |
|
||||||
|
|
||||||
> Spring Boot API 端口(30032 / 30033)仅容器内使用,不对外暴露,通过 Nginx 反代访问。
|
> Spring Boot API 端口(30032 / 30033)仅容器内监听,不对外暴露。
|
||||||
|
> 宝塔 Nginx 通过域名反代到 `127.0.0.1:18081 / 18082`,再由容器内 Nginx 转发到 API。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -71,30 +118,14 @@ deploy/docker/ssl-cert/
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 仅重建前端(改了域名后)
|
## 常用运维命令
|
||||||
|
|
||||||
前端镜像在 build time 注入了 API 域名(`VUE_APP_BASE_API` / `H5_API_DOMAIN`),
|
|
||||||
修改 `.env` 中的 URL 后需要重新构建:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 重建管理后台(改了 SINGLE_ADMIN_API_PUBLIC_URL)
|
# 重启 Java API(更新 JAR 后)
|
||||||
docker compose --env-file .env build single-admin-web
|
docker compose --env-file .env restart single-front-api
|
||||||
docker compose --env-file .env up -d single-admin-web
|
|
||||||
|
|
||||||
# 重建 H5(改了 SINGLE_FRONT_API_PUBLIC_URL)
|
|
||||||
docker compose --env-file .env build single-h5
|
|
||||||
docker compose --env-file .env up -d single-h5
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 常用命令
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 重启某个服务
|
|
||||||
docker compose --env-file .env restart single-admin-api
|
docker compose --env-file .env restart single-admin-api
|
||||||
|
|
||||||
# 实时日志
|
# 实时日志(宿主机路径 /www/wwwroot/javaapi/logs/ 也可直接查看)
|
||||||
docker compose --env-file .env logs -f single-admin-api
|
docker compose --env-file .env logs -f single-admin-api
|
||||||
docker compose --env-file .env logs -f single-front-api
|
docker compose --env-file .env logs -f single-front-api
|
||||||
|
|
||||||
@@ -104,20 +135,34 @@ docker compose --env-file .env exec single-admin-api bash
|
|||||||
# 停止(保留卷)
|
# 停止(保留卷)
|
||||||
docker compose --env-file .env down
|
docker compose --env-file .env down
|
||||||
|
|
||||||
# 停止并删除卷(慎用:清空图片/日志)
|
# 停止并删除 Redis 数据卷(慎用)
|
||||||
docker compose --env-file .env down -v
|
docker compose --env-file .env down -v
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## bind-mount 目录总览
|
||||||
|
|
||||||
|
| 宿主机路径 | 挂入容器路径 | 说明 |
|
||||||
|
|---|---|---|
|
||||||
|
| `/www/wwwroot/javaapi/miao-front-2.2.jar` | `/app/app.jar` (front-api) | 用户端 API JAR(只读) |
|
||||||
|
| `/www/wwwroot/javaapi/miao-admin-2.2.jar` | `/app/app.jar` (admin-api) | 管理端 API JAR(只读) |
|
||||||
|
| `/www/wwwroot/javaapi/logs/front/` | `/app/log` (front-api) | 用户端 API 日志 |
|
||||||
|
| `/www/wwwroot/javaapi/logs/admin/` | `/app/log` (admin-api) | 管理端 API 日志 |
|
||||||
|
| `/www/wwwroot/leilei.czchunfang.com/crmebimage/` | `/usr/local/crmeb/crmebimage/` (两个 API) | 图片/PDF 写入目录 |
|
||||||
|
| `/www/wwwroot/leilei-jf.czchunfang.com/` | `/usr/share/nginx/html` (h5) | H5 静态文件 |
|
||||||
|
| `/www/wwwroot/leilei-jfadmin.czchunfang.com/` | `/usr/share/nginx/html` (admin-web) | 管理后台静态文件 |
|
||||||
|
| `../single-shop/application-docker.yml` | `/config/application-docker.yml` (两个 API) | Spring Boot 配置(只读) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## czleilei240 关键配置对照
|
## czleilei240 关键配置对照
|
||||||
|
|
||||||
| 配置项 | 值 |
|
| 配置项 | 值 |
|
||||||
|---|---|
|
|---|---|
|
||||||
| RDS Host | `rm-bp1a178eq62lxba9xbo.mysql.rds.aliyuncs.com` |
|
| RDS Host | `rm-bp1a178eq62lxba9xbo.mysql.rds.aliyuncs.com` |
|
||||||
| DB / User | `yangtangyoupin` |
|
| DB / User | `yangtangyoupin` |
|
||||||
| admin-web API URL(VUE_APP_BASE_API) | `https://leilei-jf.czchunfang.com` |
|
| crmeb.imagePath(容器内) | `/usr/local/crmeb/crmebimage/` |
|
||||||
| H5 API Domain(H5_API_DOMAIN) | `https://leilei-jf.czchunfang.com` |
|
|
||||||
| SYNC_SOURCE_ID | `shop_15` |
|
| SYNC_SOURCE_ID | `shop_15` |
|
||||||
| SYNC_TARGET_MER_ID | `15` |
|
| SYNC_TARGET_MER_ID | `15` |
|
||||||
| Spring profile | `docker`(application-docker.yml 通过 env 注入) |
|
| Spring profile | `docker`(application-docker.yml 通过 env 注入) |
|
||||||
@@ -126,5 +171,6 @@ docker compose --env-file .env down -v
|
|||||||
|
|
||||||
## 备注
|
## 备注
|
||||||
|
|
||||||
- `single-images` 卷挂载到两个 API 容器,确保图片文件共享。
|
|
||||||
- JVM 参数已包含 Java 17 + Spring Boot 2.2.6 所需的 `--add-opens` 标志(见 Dockerfile)。
|
- JVM 参数已包含 Java 17 + Spring Boot 2.2.6 所需的 `--add-opens` 标志(见 Dockerfile)。
|
||||||
|
- 图片/PDF 目录 `/www/wwwroot/leilei.czchunfang.com/crmebimage/` 同时挂入 `front-api` 和 `admin-api` 两个容器,确保文件共享。
|
||||||
|
- Redis 实例(`single-redis`)与步骤一(`integral-redis`)完全独立,数据互不干扰。
|
||||||
|
|||||||
@@ -3,6 +3,12 @@
|
|||||||
# 客户:池州雷蕾商贸 czleilei240
|
# 客户:池州雷蕾商贸 czleilei240
|
||||||
# 包含服务:redis · single-admin-api · single-front-api
|
# 包含服务:redis · single-admin-api · single-front-api
|
||||||
# single-admin-web(Vue) · single-h5(uni-app)
|
# single-admin-web(Vue) · single-h5(uni-app)
|
||||||
|
#
|
||||||
|
# 优化要点(参考 step1 寄卖商城经验):
|
||||||
|
# 1. Redis:本地 Alpine+apk 构建,不从 DockerHub 拉取镜像
|
||||||
|
# 2. Java API:不含 Maven 编译,JAR bind-mount 自宿主机(快速部署/更新)
|
||||||
|
# 3. 前端:Nginx only 镜像,静态文件 bind-mount(更新无需重建镜像)
|
||||||
|
# 4. 日志:bind-mount 到宿主机,无需进容器查看
|
||||||
# =============================================================
|
# =============================================================
|
||||||
|
|
||||||
name: jifenmall-czleilei240
|
name: jifenmall-czleilei240
|
||||||
@@ -37,16 +43,17 @@ networks:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
single-redis-data:
|
single-redis-data:
|
||||||
single-front-logs:
|
|
||||||
single-admin-logs:
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# ---------- Redis ----------
|
# ---------- Redis(Alpine 本地构建,无需拉取 Docker Hub 镜像) ----------
|
||||||
redis:
|
redis:
|
||||||
<<: *common
|
<<: *common
|
||||||
image: redis:6.2-alpine
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: redis.Dockerfile
|
||||||
|
image: jifenmall-czleilei240/redis:local
|
||||||
container_name: single-redis
|
container_name: single-redis
|
||||||
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}", "--appendonly", "yes"]
|
command: ["--requirepass", "${REDIS_PASSWORD}", "--appendonly", "yes"]
|
||||||
volumes:
|
volumes:
|
||||||
- single-redis-data:/data
|
- single-redis-data:/data
|
||||||
networks: [single-net]
|
networks: [single-net]
|
||||||
@@ -57,19 +64,26 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
# ---------- Front API(用户端 Spring Boot) ----------
|
# ---------- Front API(用户端 Spring Boot) ----------
|
||||||
|
# JAR 文件 bind-mount 自 ${SINGLE_FRONT_JAR}(宿主机 /www/wwwroot/javaapi/miao-front-2.2.jar)
|
||||||
|
# 更新 JAR:FTP 替换宿主机文件 → docker compose restart single-front-api
|
||||||
single-front-api:
|
single-front-api:
|
||||||
<<: *spring-common
|
<<: *spring-common
|
||||||
build:
|
build:
|
||||||
context: ../../../single-shop-22/backend
|
context: .
|
||||||
dockerfile: ../../deploy/docker/single-shop/front-api.Dockerfile
|
dockerfile: ../single-shop/front-api.Dockerfile
|
||||||
image: jifenmall-czleilei240/front-api:latest
|
image: jifenmall-czleilei240/front-api:local
|
||||||
container_name: single-front-api
|
container_name: single-front-api
|
||||||
networks: [single-net]
|
networks: [single-net]
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:30033:30033"
|
||||||
volumes:
|
volumes:
|
||||||
# 图片/PDF 目录 bind mount 到宿主机,与步骤一 H5 Nginx 共享同一路径
|
# JAR bind-mount:FTP 更新 JAR 后 restart 容器即可
|
||||||
# /www/wwwroot/leilei.czchunfang.com/crmebimage/ → 通过 leilei.czchunfang.com 对外访问
|
- ${SINGLE_FRONT_JAR}:/app/app.jar:ro
|
||||||
|
# 图片/PDF 目录:与 step1 H5 Nginx 共享宿主机路径
|
||||||
- ${CRMEB_IMAGE_DIR}:/usr/local/crmeb/crmebimage
|
- ${CRMEB_IMAGE_DIR}:/usr/local/crmeb/crmebimage
|
||||||
- single-front-logs:/app/log
|
# 日志:bind-mount 到宿主机,便于直接查看
|
||||||
|
- ${SINGLE_FRONT_LOG_DIR}:/app/log
|
||||||
|
# Spring 配置:只读挂入
|
||||||
- ../single-shop/application-docker.yml:/config/application-docker.yml:ro
|
- ../single-shop/application-docker.yml:/config/application-docker.yml:ro
|
||||||
environment:
|
environment:
|
||||||
TZ: ${TZ:-Asia/Shanghai}
|
TZ: ${TZ:-Asia/Shanghai}
|
||||||
@@ -94,19 +108,26 @@ services:
|
|||||||
start_period: 90s
|
start_period: 90s
|
||||||
|
|
||||||
# ---------- Admin API(管理端 Spring Boot) ----------
|
# ---------- Admin API(管理端 Spring Boot) ----------
|
||||||
|
# JAR 文件 bind-mount 自 ${SINGLE_ADMIN_JAR}(宿主机 /www/wwwroot/javaapi/miao-admin-2.2.jar)
|
||||||
|
# 更新 JAR:FTP 替换宿主机文件 → docker compose restart single-admin-api
|
||||||
single-admin-api:
|
single-admin-api:
|
||||||
<<: *spring-common
|
<<: *spring-common
|
||||||
build:
|
build:
|
||||||
context: ../../../single-shop-22/backend
|
context: .
|
||||||
dockerfile: ../../deploy/docker/single-shop/admin-api.Dockerfile
|
dockerfile: ../single-shop/admin-api.Dockerfile
|
||||||
image: jifenmall-czleilei240/admin-api:latest
|
image: jifenmall-czleilei240/admin-api:local
|
||||||
container_name: single-admin-api
|
container_name: single-admin-api
|
||||||
networks: [single-net]
|
networks: [single-net]
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:30032:30032"
|
||||||
volumes:
|
volumes:
|
||||||
# 图片/PDF 目录 bind mount 到宿主机,与步骤一 H5 Nginx 共享同一路径
|
# JAR bind-mount
|
||||||
# /www/wwwroot/leilei.czchunfang.com/crmebimage/ → 通过 leilei.czchunfang.com 对外访问
|
- ${SINGLE_ADMIN_JAR}:/app/app.jar:ro
|
||||||
|
# 图片/PDF 目录
|
||||||
- ${CRMEB_IMAGE_DIR}:/usr/local/crmeb/crmebimage
|
- ${CRMEB_IMAGE_DIR}:/usr/local/crmeb/crmebimage
|
||||||
- single-admin-logs:/app/log
|
# 日志 bind-mount
|
||||||
|
- ${SINGLE_ADMIN_LOG_DIR}:/app/log
|
||||||
|
# Spring 配置
|
||||||
- ../single-shop/application-docker.yml:/config/application-docker.yml:ro
|
- ../single-shop/application-docker.yml:/config/application-docker.yml:ro
|
||||||
environment:
|
environment:
|
||||||
TZ: ${TZ:-Asia/Shanghai}
|
TZ: ${TZ:-Asia/Shanghai}
|
||||||
@@ -130,34 +151,40 @@ services:
|
|||||||
retries: 5
|
retries: 5
|
||||||
start_period: 90s
|
start_period: 90s
|
||||||
|
|
||||||
# ---------- Admin Web(Vue 管理后台) ----------
|
# ---------- Admin Web(Vue 管理后台,Nginx only) ----------
|
||||||
|
# 静态文件 bind-mount 自 ${SINGLE_ADMIN_WEB_DIR}(宿主机 /www/wwwroot/leilei-jfadmin.czchunfang.com/)
|
||||||
|
# 更新前端:rsync 新 dist/ 到宿主机目录 → 浏览器硬刷新即可(无需重启容器)
|
||||||
single-admin-web:
|
single-admin-web:
|
||||||
<<: *common
|
<<: *common
|
||||||
build:
|
build:
|
||||||
context: ../../../single-shop-22/backend-adminend
|
context: .
|
||||||
dockerfile: ../../deploy/docker/single-shop/admin-web.Dockerfile
|
dockerfile: ../single-shop/admin-web.Dockerfile
|
||||||
args:
|
image: jifenmall-czleilei240/admin-web:local
|
||||||
VUE_APP_BASE_API: ${SINGLE_ADMIN_API_PUBLIC_URL}
|
|
||||||
image: jifenmall-czleilei240/admin-web:latest
|
|
||||||
container_name: single-admin-web
|
container_name: single-admin-web
|
||||||
networks: [single-net]
|
networks: [single-net]
|
||||||
ports:
|
ports:
|
||||||
- "${SINGLE_ADMIN_PORT:-18081}:80"
|
- "${SINGLE_ADMIN_PORT:-18081}:80"
|
||||||
|
volumes:
|
||||||
|
# 静态文件 bind-mount:rsync 更新宿主机目录后立即生效
|
||||||
|
- ${SINGLE_ADMIN_WEB_DIR}:/usr/share/nginx/html
|
||||||
depends_on:
|
depends_on:
|
||||||
- single-admin-api
|
- single-admin-api
|
||||||
|
|
||||||
# ---------- H5 前端(uni-app) ----------
|
# ---------- H5 前端(uni-app SPA,Nginx only) ----------
|
||||||
|
# 静态文件 bind-mount 自 ${SINGLE_H5_DIR}(宿主机 /www/wwwroot/leilei-jf.czchunfang.com/)
|
||||||
|
# 更新前端:rsync 新 unpackage/dist/build/h5/ 到宿主机目录 → 无需重启容器
|
||||||
single-h5:
|
single-h5:
|
||||||
<<: *common
|
<<: *common
|
||||||
build:
|
build:
|
||||||
context: ../../../single-shop-22/single_uniapp22miao
|
context: .
|
||||||
dockerfile: ../../deploy/docker/single-shop/h5.Dockerfile
|
dockerfile: ../single-shop/h5.Dockerfile
|
||||||
args:
|
image: jifenmall-czleilei240/h5:local
|
||||||
H5_API_DOMAIN: ${SINGLE_FRONT_API_PUBLIC_URL}
|
|
||||||
image: jifenmall-czleilei240/h5:latest
|
|
||||||
container_name: single-h5
|
container_name: single-h5
|
||||||
networks: [single-net]
|
networks: [single-net]
|
||||||
ports:
|
ports:
|
||||||
- "${SINGLE_H5_PORT:-18082}:80"
|
- "${SINGLE_H5_PORT:-18082}:80"
|
||||||
|
volumes:
|
||||||
|
# 静态文件 bind-mount
|
||||||
|
- ${SINGLE_H5_DIR}:/usr/share/nginx/html
|
||||||
depends_on:
|
depends_on:
|
||||||
- single-front-api
|
- single-front-api
|
||||||
|
|||||||
18
deploy/docker/step2-single-shop/redis.Dockerfile
Normal file
18
deploy/docker/step2-single-shop/redis.Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# =============================================================
|
||||||
|
# Redis(Alpine + apk 安装,绕过 Docker Hub 镜像拉取问题)
|
||||||
|
# 与 step1 方案一致:不依赖 docker.io,只需 registry-1.docker.io 拉 alpine:3.19
|
||||||
|
# =============================================================
|
||||||
|
|
||||||
|
FROM alpine:3.19
|
||||||
|
|
||||||
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \
|
||||||
|
&& apk add --no-cache redis tzdata \
|
||||||
|
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||||
|
&& echo "Asia/Shanghai" > /etc/timezone \
|
||||||
|
&& rm -f /etc/apk/cache/*.apk
|
||||||
|
|
||||||
|
VOLUME /data
|
||||||
|
WORKDIR /data
|
||||||
|
EXPOSE 6379
|
||||||
|
|
||||||
|
ENTRYPOINT ["redis-server"]
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
// let domain = 'https://jf.bosenyuan.com'
|
// let domain = 'https://jf.bosenyuan.com'
|
||||||
// let domain = 'https://jfanyue.szxingming.com'
|
// let domain = 'https://jfanyue.szxingming.com'
|
||||||
// let domain = 'https://jf.wenjinhui.com'
|
// let domain = 'https://jf.wenjinhui.com'
|
||||||
// miao33项目
|
// czleilei240 项目
|
||||||
let domain = 'https://jf.bosenyuan.com'
|
let domain = 'https://leilei-jf.czchunfang.com'
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
// 请求域名 格式: https://您的域名
|
// 请求域名 格式: https://您的域名
|
||||||
@@ -14,7 +14,7 @@ module.exports = {
|
|||||||
// HTTP_REQUEST_URL:'',
|
// HTTP_REQUEST_URL:'',
|
||||||
HTTP_REQUEST_URL: domain,
|
HTTP_REQUEST_URL: domain,
|
||||||
// H5商城地址
|
// H5商城地址
|
||||||
HTTP_H5_URL: 'https://jf.bosenyuan.com',
|
HTTP_H5_URL: 'https://leilei-jf.czchunfang.com',
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
HTTP_REQUEST_URL:domain,
|
HTTP_REQUEST_URL:domain,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pdfUrl: '/static/templates-xsj.pdf',
|
pdfUrl: '/static/sign_contract_czleilei240.pdf',
|
||||||
userId: '',
|
userId: '',
|
||||||
isMobile: false,
|
isMobile: false,
|
||||||
usePdfJs: false,
|
usePdfJs: false,
|
||||||
|
|||||||
@@ -340,12 +340,12 @@ export default {
|
|||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// window.location.href = 'https://shop.wenjinhui.com/?#/pages/personal/index'
|
// window.location.href = 'https://shop.wenjinhui.com/?#/pages/personal/index'
|
||||||
//window.location.href = 'https://anyue.szxingming.com/?#/pages/personal/index'
|
//window.location.href = 'https://anyue.szxingming.com/?#/pages/personal/index'
|
||||||
window.location.href = 'https://xiashengjun.com/?#/pages/personal/index'
|
window.location.href = 'https://leilei.czchunfang.com/?#/pages/personal/index'
|
||||||
// window.location.href = 'http://shop.bosenyuan.com/?#/pages/personal/index'
|
// window.location.href = 'http://shop.bosenyuan.com/?#/pages/personal/index'
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/web-view/index?url=' + encodeURIComponent('https://xiashengjun.com/?#/pages/personal/index')
|
url: '/pages/web-view/index?url=' + encodeURIComponent('https://leilei.czchunfang.com/?#/pages/personal/index')
|
||||||
})
|
})
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
const url = options && options.url ? decodeURIComponent(options.url) : '/static/templates.pdf'
|
const url = options && options.url ? decodeURIComponent(options.url) : '/static/sign_contract_czleilei240.pdf'
|
||||||
this.pdfUrl = url
|
this.pdfUrl = url
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -362,7 +362,7 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// window.location.href = 'https://shop.wenjinhui.com/?#/pages/rushing/index' + (this.userId ? ('?user_id=' + this.userId) : '')
|
// window.location.href = 'https://shop.wenjinhui.com/?#/pages/rushing/index' + (this.userId ? ('?user_id=' + this.userId) : '')
|
||||||
// window.location.href = 'https://anyue.szxingming.com/?#/pages/rushing/index' + (this.userId ? ('?user_id=' + this.userId) : '')
|
// window.location.href = 'https://anyue.szxingming.com/?#/pages/rushing/index' + (this.userId ? ('?user_id=' + this.userId) : '')
|
||||||
window.location.href = 'https://xiashengjun.com/?#/pages/rushing/index' + (this.userId ? ('?user_id=' + this.userId) : '')
|
window.location.href = 'https://leilei.czchunfang.com/?#/pages/rushing/index' + (this.userId ? ('?user_id=' + this.userId) : '')
|
||||||
// window.location.href = 'https://shop.uj345.com/?#/pages/rushing/index' + (this.userId ? ('?user_id=' + this.userId) : '')
|
// window.location.href = 'https://shop.uj345.com/?#/pages/rushing/index' + (this.userId ? ('?user_id=' + this.userId) : '')
|
||||||
}, 1000)
|
}, 1000)
|
||||||
// 返回签名信息给上一页面
|
// 返回签名信息给上一页面
|
||||||
|
|||||||
Reference in New Issue
Block a user