This commit is contained in:
yanweidong
2026-01-27 00:25:34 +08:00
parent 1e34ef857f
commit f74299fd25
20 changed files with 920 additions and 0 deletions

15
etc/gostock.service Normal file
View File

@@ -0,0 +1,15 @@
[Unit]
Description=gostock Service
[Service]
Type=simple
Restart=always
RestartSec=2s
Environment="BSM_RuntimeMode=prod" "BSM_Prefix=/data/app/"
ExecStart=/data/app/gostock
WorkingDirectory=/data/app/
StandardOutput=file:/data/app/logs/gostock.log
[Install]
WantedBy=multi-user.target

22
etc/gostock_dev.yaml Normal file
View File

@@ -0,0 +1,22 @@
Service: gostock
Port: 14299
Databases:
Driver: postgres
Source:
- host=8.137.107.29 user=postgres password=Weidong2023~! dbname=stock_test port=19432 sslmode=disable TimeZone=Asia/Shanghai
# cache DB的选择请在后面直接带参数不带会自动HASH计算选择DB库。
Cache: redis://null:Weidong2023~!@8.137.107.29:19379/
# 日志配置
Log:
Level: 0 # 0:debug, 1:info, 2:warn, 3:error, 4:fatal
Dir: logs
Endpoint: http://127.0.0.1:13299/log
Remote: false
Console: true
File: true

20
etc/gostock_prod.yaml Normal file
View File

@@ -0,0 +1,20 @@
Service: gostock
Port: 14299
Databases:
Driver: postgres
Source:
- host=8.137.107.29 user=postgres password=Weidong2023~! dbname=stock_test port=19432 sslmode=disable TimeZone=Asia/Shanghai
# cache DB的选择请在后面直接带参数不带会自动HASH计算选择DB库。
Cache: redis://null:Weidong2023~!@8.137.107.29:19379/
# 日志配置
Log:
Level: 0 # 0:debug, 1:info, 2:warn, 3:error, 4:fatal
Dir: logs
Endpoint: http://127.0.0.1:13299/log
Remote: false
Console: true
File: true

20
etc/gostock_test.yaml Normal file
View File

@@ -0,0 +1,20 @@
Service: gostock
Port: 14299
Databases:
Driver: postgres
Source:
- host=8.137.107.29 user=postgres password=Weidong2023~! dbname=stock_test port=19432 sslmode=disable TimeZone=Asia/Shanghai
# cache DB的选择请在后面直接带参数不带会自动HASH计算选择DB库。
Cache: redis://null:Weidong2023~!@8.137.107.29:19379/
# 日志配置
Log:
Level: 0 # 0:debug, 1:info, 2:warn, 3:error, 4:fatal
Dir: logs
Endpoint: http://127.0.0.1:13299/log
Remote: false
Console: true
File: true