Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Aivitr
algorithm-study-master
Repository navigation
Code
Issues
Pull requests
1
(1)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
algorithm-study-master
/
.env.dev.example
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
38 lines (34 loc) · 1.47 KB
main
Breadcrumbs
algorithm-study-master
/
.env.dev.example
Copy path
Top
File metadata and controls
Code
Blame
38 lines (34 loc) · 1.47 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# ===== 开发 / 比赛环境:直连远程数据库 =====
#
# 用法: cp .env.dev.example .env.dev
# 然后把下面 6 个值填成远程库的连接信息。.env.dev 已被 gitignore,不会入库。
#
# 为什么是 6 个键:ORM 读 DATABASE_URL,而 /api/register 与 /api/login 直接
# pymssql.connect(DB_HOST, DB_PORT, ...),不读 DATABASE_URL。只填 DATABASE_URL
# 会导致注册/登录连不上。
#
# ⚠️ DB_AUTO_MIGRATE=0:禁止 app 在导入期对远程库执行 ALTER TABLE。
# 需要补列时,用显式迁移脚本,不要在开发启动时顺手改远程库。
DB_AUTO_MIGRATE=0
DB_HOST=<远程数据库主机名>
DB_PORT=<端口;阿里云 RDS SQL Server 常见为 3433>
DB_USER=<用户名>
DB_PASSWORD=<口令>
DB_NAME=<库名>
DATABASE_URL=mssql+pymssql://<用户名>:<口令>@<主机>:<端口>/<库名>?charset=utf8
# ---------------------------------------------------------------------------
# 可选:本地 MSSQL(默认不启动)
#
# docker compose --profile local-db up
#
# 用本地库时,把上面的 DB_HOST 改成 db、DB_PORT 改成 1433,并补一个
# MSSQL_SA_PASSWORD(db 容器初始化 sa 用它,且要与 DB_PASSWORD 一致):
#
# MSSQL_SA_PASSWORD=<本地 sa 口令>
# DB_HOST=db
# DB_PORT=1433
# DB_USER=sa
# DB_PASSWORD=<本地 sa 口令>
# DB_NAME=cscl_db
# DATABASE_URL=mssql+pymssql://sa:<本地 sa 口令>@db:1433/cscl_db?charset=utf8
# ---------------------------------------------------------------------------
You can’t perform that action at this time.