mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2026-06-16 01:02:14 +08:00
发布 Dujiao-Next
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
server:
|
||||
host: 0.0.0.0
|
||||
port: 8080
|
||||
mode: debug
|
||||
|
||||
log:
|
||||
dir: ""
|
||||
filename: app.log
|
||||
max_size_mb: 100
|
||||
max_backups: 7
|
||||
max_age_days: 30
|
||||
compress: true
|
||||
|
||||
database:
|
||||
driver: sqlite
|
||||
dsn: ./db/dujiao.db
|
||||
pool:
|
||||
max_open_conns: 1
|
||||
max_idle_conns: 1
|
||||
conn_max_lifetime_seconds: 0
|
||||
conn_max_idle_time_seconds: 0
|
||||
|
||||
jwt:
|
||||
secret: your-secret-key-change-in-production-please
|
||||
expire_hours: 24
|
||||
|
||||
user_jwt:
|
||||
secret: user-secret-key-change-in-production-please
|
||||
expire_hours: 24
|
||||
remember_me_expire_hours: 168
|
||||
|
||||
telegram_auth:
|
||||
enabled: false
|
||||
bot_username: ""
|
||||
bot_token: ""
|
||||
login_expire_seconds: 300
|
||||
replay_ttl_seconds: 300
|
||||
|
||||
redis:
|
||||
enabled: true
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password: ""
|
||||
db: 0
|
||||
prefix: "dj"
|
||||
|
||||
queue:
|
||||
enabled: true
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
password: ""
|
||||
db: 1
|
||||
concurrency: 10
|
||||
queues:
|
||||
default: 10
|
||||
critical: 5
|
||||
|
||||
upload:
|
||||
max_size: 10485760
|
||||
allowed_types:
|
||||
- image/jpeg
|
||||
- image/png
|
||||
- image/gif
|
||||
- image/webp
|
||||
allowed_extensions:
|
||||
- .jpg
|
||||
- .jpeg
|
||||
- .png
|
||||
- .gif
|
||||
- .webp
|
||||
max_width: 4096
|
||||
max_height: 4096
|
||||
|
||||
cors:
|
||||
allowed_origins:
|
||||
- "*"
|
||||
allowed_methods:
|
||||
- GET
|
||||
- POST
|
||||
- PUT
|
||||
- PATCH
|
||||
- DELETE
|
||||
- OPTIONS
|
||||
allowed_headers:
|
||||
- Content-Type
|
||||
- Content-Length
|
||||
- Accept-Encoding
|
||||
- Authorization
|
||||
- Cache-Control
|
||||
- X-Requested-With
|
||||
- X-CSRF-Token
|
||||
allow_credentials: true
|
||||
max_age: 600
|
||||
|
||||
security:
|
||||
login_rate_limit:
|
||||
window_seconds: 300
|
||||
max_attempts: 5
|
||||
block_seconds: 900
|
||||
password_policy:
|
||||
min_length: 8
|
||||
require_upper: true
|
||||
require_lower: true
|
||||
require_number: true
|
||||
require_special: false
|
||||
|
||||
email:
|
||||
enabled: true
|
||||
host: smtp.xxx.com
|
||||
port: 465
|
||||
username: your-username
|
||||
password: your-password
|
||||
from: your-email
|
||||
from_name: your-name
|
||||
use_tls: false
|
||||
use_ssl: true
|
||||
verify_code:
|
||||
expire_minutes: 10
|
||||
send_interval_seconds: 60
|
||||
max_attempts: 5
|
||||
length: 6
|
||||
|
||||
order:
|
||||
payment_expire_minutes: 15
|
||||
@@ -0,0 +1,103 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- child:
|
||||
default: ""
|
||||
envKey: PANEL_REDIS_SERVICE
|
||||
required: true
|
||||
type: service
|
||||
default: redis
|
||||
envKey: PANEL_REDIS_TYPE
|
||||
labelZh: Redis 服务 (前置检查)
|
||||
labelEn: Redis Service (Pre-check)
|
||||
required: true
|
||||
type: apps
|
||||
values:
|
||||
- label: Redis
|
||||
value: redis
|
||||
- default: "/home/dujiaonext"
|
||||
edit: true
|
||||
envKey: DUJIAONEXT_ROOT_PATH
|
||||
labelZh: 数据持久化路径
|
||||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: 8080
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelZh: WebUI 端口
|
||||
labelEn: WebUI port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 8081
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_ADMIN
|
||||
labelZh: WebUI 后台端口
|
||||
labelEn: WebUI Admin Port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: 8082
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_API
|
||||
labelZh: API 端口
|
||||
labelEn: API Port
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: DJ_DEFAULT_ADMIN_USERNAME
|
||||
labelZh: 管理员用户名
|
||||
labelEn: Admin Username
|
||||
required: true
|
||||
type: text
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: DJ_DEFAULT_ADMIN_PASSWORD
|
||||
labelZh: 管理员密码
|
||||
labelEn: Admin Password
|
||||
required: true
|
||||
type: password
|
||||
- default: "efd8bd2b3ecdca06dba6b6213bf46e7a16b9045bda6420828eeeb8f7e36c755f"
|
||||
edit: true
|
||||
envKey: JWT_SECRET
|
||||
labelZh: JWT 密钥
|
||||
labelEn: JWT Secret
|
||||
required: true
|
||||
type: text
|
||||
- default: "d13e38a2b2d582a4f5bcfda44ae5aa9c4bd93643ff308f0e5b45833aec28af20"
|
||||
edit: true
|
||||
envKey: USER_JWT_SECRET
|
||||
labelZh: 用户 JWT 密钥
|
||||
labelEn: User JWT Secret
|
||||
required: true
|
||||
type: text
|
||||
- default: "127.0.0.1"
|
||||
edit: true
|
||||
envKey: REDIS_HOST
|
||||
labelZh: Redis 主机
|
||||
labelEn: Redis Host
|
||||
required: true
|
||||
type: text
|
||||
- default: 6379
|
||||
edit: true
|
||||
envKey: REDIS_PORT
|
||||
labelZh: Redis 端口
|
||||
labelEn: Redis Port
|
||||
required: true
|
||||
type: number
|
||||
- default: ""
|
||||
edit: true
|
||||
envKey: REDIS_PASSWORD
|
||||
labelZh: Redis 连接密码
|
||||
labelEn: Redis Connection Password
|
||||
required: false
|
||||
type: password
|
||||
- default: 0
|
||||
edit: true
|
||||
envKey: REDIS_DB
|
||||
labelZh: Redis 数据库索引
|
||||
labelEn: Redis Database Index
|
||||
required: true
|
||||
type: number
|
||||
@@ -0,0 +1,70 @@
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
dujiao-net:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
dujiaonext-api:
|
||||
image: dujiaonext/api:v0.1.0
|
||||
container_name: ${CONTAINER_NAME}
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
restart: always
|
||||
networks:
|
||||
- dujiao-net
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_API}:8080
|
||||
env_file:
|
||||
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
volumes:
|
||||
- ${DUJIAONEXT_ROOT_PATH}/config/config.yml:/app/config.yml:ro
|
||||
- ${DUJIAONEXT_ROOT_PATH}/data/db:/app/db
|
||||
- ${DUJIAONEXT_ROOT_PATH}/data/uploads:/app/uploads
|
||||
- ${DUJIAONEXT_ROOT_PATH}/data/logs:/app/logs
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- QUEUE_HOST=${REDIS_HOST:-}
|
||||
- QUEUE_PORT=${REDIS_PORT:-}
|
||||
- QUEUE_PASSWORD=${REDIS_PASSWORD:-}
|
||||
- QUEUE_DB=${REDIS_DB:-}
|
||||
healthcheck:
|
||||
test: [ "CMD", "wget", "-qO-", "http://127.0.0.1:8080/health" ]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
|
||||
dujiaonext-admin:
|
||||
depends_on:
|
||||
dujiaonext-api:
|
||||
condition: service_healthy
|
||||
image: dujiaonext/admin:v0.1.0
|
||||
container_name: admin-${CONTAINER_NAME}
|
||||
restart: always
|
||||
networks:
|
||||
- dujiao-net
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_ADMIN}:80
|
||||
env_file:
|
||||
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
|
||||
dujiaonext-user:
|
||||
depends_on:
|
||||
dujiaonext-api:
|
||||
condition: service_healthy
|
||||
image: dujiaonext/user:v0.1.0
|
||||
container_name: user-${CONTAINER_NAME}
|
||||
restart: always
|
||||
networks:
|
||||
- dujiao-net
|
||||
ports:
|
||||
- ${PANEL_APP_PORT_HTTP}:80
|
||||
env_file:
|
||||
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
@@ -0,0 +1,2 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
ENV_FILE=.env
|
||||
@@ -0,0 +1,2 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
TZ=Asia/Shanghai
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
mkdir -p "$DUJIAONEXT_ROOT_PATH"
|
||||
mkdir -p "$DUJIAONEXT_ROOT_PATH/config"
|
||||
mkdir -p "$DUJIAONEXT_ROOT_PATH/data"
|
||||
mkdir -p "$DUJIAONEXT_ROOT_PATH/data/db"
|
||||
mkdir -p "$DUJIAONEXT_ROOT_PATH/data/uploads"
|
||||
mkdir -p "$DUJIAONEXT_ROOT_PATH/data/logs"
|
||||
mkdir -p "$DUJIAONEXT_ROOT_PATH/data/redis"
|
||||
mkdir -p "$DUJIAONEXT_ROOT_PATH/data/postgres"
|
||||
|
||||
cp ./config/config.yml "$DUJIAONEXT_ROOT_PATH/config/config.yml"
|
||||
|
||||
chmod -R 777 "$DUJIAONEXT_ROOT_PATH/data"
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -0,0 +1,81 @@
|
||||
# 独角Dujiao-Next
|
||||
|
||||
拥抱现代化开源数字商品销售系统
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 简介
|
||||
|
||||
### 完整业务闭环
|
||||
|
||||
覆盖商品、订单、支付、交付、用户中心、后台管理等核心流程。
|
||||
|
||||
### 多支付接入
|
||||
|
||||
支持支付宝、微信、PayPal、Stripe 等渠道,统一支付抽象与回调处理。
|
||||
|
||||
### 可扩展可维护
|
||||
|
||||
API/User/Admin 三端分层清晰,便于二开与替换前台模板。
|
||||
|
||||
## 安装
|
||||
|
||||
JWT 推荐使用 `openssl` 生成密钥:
|
||||
|
||||
```bash
|
||||
openssl rand -hex 32
|
||||
```
|
||||
|
||||
## 反向代理
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name shop.example.com;
|
||||
|
||||
# 前台 User
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8081;
|
||||
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;
|
||||
}
|
||||
|
||||
# 后台 Admin
|
||||
location = /admin {
|
||||
return 301 /admin/;
|
||||
}
|
||||
|
||||
location /admin/ {
|
||||
proxy_pass http://127.0.0.1:8082/;
|
||||
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;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://127.0.0.1:8080/api/;
|
||||
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;
|
||||
}
|
||||
|
||||
location /uploads/ {
|
||||
proxy_pass http://127.0.0.1:8080/uploads/;
|
||||
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;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||

|
||||

|
||||
@@ -0,0 +1,17 @@
|
||||
additionalProperties:
|
||||
key: dujiaonext
|
||||
name: 独角Dujiao-Next
|
||||
tags:
|
||||
- WebSite
|
||||
- Local
|
||||
shortDescZh: 拥抱现代化开源数字商品销售系统
|
||||
shortDescEn: Embrace the Modern Open-Source Digital Goods Sales System
|
||||
type: website
|
||||
crossVersionUpdate: true
|
||||
limit: 0
|
||||
website: https://dujiao-next.com/
|
||||
github: https://github.com/dujiao-next/
|
||||
document: https://dujiao-next.com/
|
||||
architectures:
|
||||
- amd64
|
||||
- arm64
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 366 KiB |
Reference in New Issue
Block a user