接入Gitea Actions蓝绿发布:API_KEY构建时注入、新增Dockerfile
- src/config.js 的 API_KEY 改为从构建时环境变量 TINODE_API_KEY 注入, 不再依赖官方demo默认值;未设置时保留原demo key作为本地快速测试的兜底 - webpack.config.js 新增 DefinePlugin 完成注入,并自动加载(gitignored的) .env.local,开发者本地调试不需要每次手动export - 新增 Dockerfile(node构建+nginx serve) 和 docker/nginx.conf - 新增 .gitea/workflows/deploy.yml:手动触发的蓝绿发布流程
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Tinode webapp uses hash-based client-side routing, so any unknown path
|
||||
# can safely fall back to index.html.
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location /umd/ {
|
||||
add_header Cache-Control "public, max-age=31536000, immutable";
|
||||
}
|
||||
|
||||
location /img/ {
|
||||
add_header Cache-Control "public, max-age=86400";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user