feat: 添加.env示例文件,更新.gitignore忽略.env和appsettings文件

This commit is contained in:
claw_bot 2026-03-09 09:24:21 +00:00
parent 8f934c897e
commit 19e53bd86e
2 changed files with 55 additions and 327 deletions

23
.env.example Normal file
View File

@ -0,0 +1,23 @@
# AssetManager 环境变量配置示例
# 复制此文件为 .env修改配置后使用 docker-compose --env-file .env up -d 启动
# 运行环境Production/Development
ASPNETCORE_ENVIRONMENT=Production
# MySQL 数据库连接字符串
ConnectionStrings__Default=server=你的MySQL地址;Database=assetmanager;Uid=你的数据库用户名;Pwd=你的数据库密码;CharSet=utf8mb4;Allow User Variables=true;
# JWT 配置
Jwt__SecretKey=你的自定义JWT签名密钥至少32位字符
Jwt__Issuer=AssetManager
Jwt__Audience=AssetManager
# 微信小程序配置
Wechat__AppId=你的微信小程序AppId
Wechat__AppSecret=你的微信小程序AppSecret
# Tiingo 股票数据 API Key申请地址https://www.tiingo.com/
Tiingo__ApiKey=你的Tiingo API Key
# 时区(保持上海时区即可)
TZ=Asia/Shanghai

359
.gitignore vendored
View File

@ -1,328 +1,33 @@
# Build results **/.classpath
**/bin/ **/.dockerignore
**/obj/ **/.env
**/Debug/ **/.git
**/Release/ **/.gitignore
[Dd]ebug/ **/.project
[Dd]ebugPublic/ **/.settings
[Rr]elease/ **/.toolstarget
[Rr]eleases/ **/.vs
x64/ **/.vscode
x86/ **/*.*proj.user
[Ww][Ii][Nn]32/ **/*.dbmdl
[Aa][Rr][Mm]/ **/*.jfm
[Aa][Rr][Mm]64/ **/bin
bld/ **/charts
[Ll]og/ **/docker-compose*
[Ll]ogs/ **/Dockerfile*
**/node_modules
# Visual Studio cache/options directory **/npm-debug.log
.vs/ **/obj
.vscode/ **/secrets.dev.yaml
**/values.dev.yaml
# User-specific files *.md
*.rsuser .git
*.suo .vs
.vscode
bin
obj
logs
*.user *.user
*.userosscache appsettings.json
*.sln.docstates appsettings.*.json
.env
# Mono auto generated files
mono_crash.*
# Build results of an ATL project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# NuGet Packages
*.nupkg
*.snupkg
**/packages/*
!**/packages/build/
*.nuget.props
*.nuget.targets
# JetBrains Rider
.idea/
*.sln.iml
# macOS
.DS_Store
# Windows
Thumbs.db
ehthumbs.db
Desktop.ini
# Test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# ReSharper
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# NuGet Symbol Packages
*.snupkg
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
.idea/