mirror of
https://github.com/arch3rPro/1Panel-Appstore.git
synced 2026-04-25 23:27:15 +08:00
refactor(sub2api): 重构配置管理和版本结构
移除硬编码的配置文件,改为使用环境变量 添加 0.1.106 稳定版本目录结构 更新 README 文档说明自动生成密码功能
This commit is contained in:
35
apps/sub2api/0.1.106/data.yml
Normal file
35
apps/sub2api/0.1.106/data.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: 8080
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
labelEn: Web Port
|
||||
labelZh: Web 端口
|
||||
required: true
|
||||
rule: paramPort
|
||||
type: number
|
||||
- default: Asia/Shanghai
|
||||
edit: true
|
||||
envKey: TZ
|
||||
labelEn: Time Zone
|
||||
labelZh: 时区
|
||||
required: true
|
||||
type: text
|
||||
- default: sub2api-jwt-secret-change-in-production
|
||||
edit: true
|
||||
envKey: JWT_SECRET
|
||||
labelEn: JWT Secret
|
||||
labelZh: JWT 密钥
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
- default: sub2api_db_pass
|
||||
edit: true
|
||||
envKey: POSTGRES_PASSWORD
|
||||
labelEn: PostgreSQL Password
|
||||
labelZh: PostgreSQL 密码
|
||||
random: true
|
||||
required: true
|
||||
rule: paramComplexity
|
||||
type: password
|
||||
0
apps/sub2api/0.1.106/data/.gitkeep
Normal file
0
apps/sub2api/0.1.106/data/.gitkeep
Normal file
56
apps/sub2api/0.1.106/docker-compose.yml
Normal file
56
apps/sub2api/0.1.106/docker-compose.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
services:
|
||||
sub2api:
|
||||
image: weishaw/sub2api:0.1.106
|
||||
container_name: ${CONTAINER_NAME}
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
ports:
|
||||
- "${PANEL_APP_PORT_HTTP}:8080"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
environment:
|
||||
- TZ=${TZ}
|
||||
- POSTGRES_CONN_STRING=postgres://sub2api:${POSTGRES_PASSWORD}@postgres:5432/sub2api?sslmode=disable
|
||||
- REDIS_CONN_STRING=redis://redis:6379/0
|
||||
- JWT_SECRET=${JWT_SECRET}
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
container_name: ${CONTAINER_NAME}-postgres
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
environment:
|
||||
- POSTGRES_DB=sub2api
|
||||
- POSTGRES_USER=sub2api
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
container_name: ${CONTAINER_NAME}-redis
|
||||
restart: always
|
||||
networks:
|
||||
- 1panel-network
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
command: redis-server --appendonly yes
|
||||
labels:
|
||||
createdBy: "Apps"
|
||||
|
||||
networks:
|
||||
1panel-network:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
Reference in New Issue
Block a user