Loading...
Loading...
Compare original and translation side by side
undefinedundefinedundefinedundefined{
"env": {
"INSTANTLY_API_KEY": "@instantly_api_key"
},
"functions": {
"api/**/*.ts": {
"maxDuration": 30
}
}
}{
"env": {
"INSTANTLY_API_KEY": "@instantly_api_key"
},
"functions": {
"api/**/*.ts": {
"maxDuration": 30
}
}
}app = "my-instantly-app"
primary_region = "iad"
[env]
NODE_ENV = "production"
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = trueapp = "my-instantly-app"
primary_region = "iad"
[env]
NODE_ENV = "production"
[http_service]
internal_port = 3000
force_https = true
auto_stop_machines = true
auto_start_machines = trueundefinedundefinedundefinedundefinedFROM node:20-slim
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
CMD ["npm", "start"]FROM node:20-slim
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
CMD ["npm", "start"]#!/bin/bash#!/bin/bashundefinedundefined// config/instantly.ts
interface InstantlyConfig {
apiKey: string;
environment: 'development' | 'staging' | 'production';
webhookSecret?: string;
}
export function getInstantlyConfig(): InstantlyConfig {
const env = process.env.NODE_ENV || 'development';
return {
apiKey: process.env.INSTANTLY_API_KEY!,
environment: env as InstantlyConfig['environment'],
webhookSecret: process.env.INSTANTLY_WEBHOOK_SECRET,
};
}// config/instantly.ts
interface InstantlyConfig {
apiKey: string;
environment: 'development' | 'staging' | 'production';
webhookSecret?: string;
}
export function getInstantlyConfig(): InstantlyConfig {
const env = process.env.NODE_ENV || 'development';
return {
apiKey: process.env.INSTANTLY_API_KEY!,
environment: env as InstantlyConfig['environment'],
webhookSecret: process.env.INSTANTLY_WEBHOOK_SECRET,
};
}// api/health.ts
export async function GET() {
const instantlyStatus = await checkInstantlyConnection();
return Response.json({
status: instantlyStatus ? 'healthy' : 'degraded',
services: {
instantly: instantlyStatus,
},
timestamp: new Date().toISOString(),
});
}// api/health.ts
export async function GET() {
const instantlyStatus = await checkInstantlyConnection();
return Response.json({
status: instantlyStatus ? 'healthy' : 'degraded',
services: {
instantly: instantlyStatus,
},
timestamp: new Date().toISOString(),
});
}| Issue | Cause | Solution |
|---|---|---|
| Secret not found | Missing configuration | Add secret via platform CLI |
| Deploy timeout | Large build | Increase build timeout |
| Health check fails | Wrong API key | Verify environment variable |
| Cold start issues | No warm-up | Configure minimum instances |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 密钥未找到 | 缺少配置 | 通过平台CLI添加密钥 |
| 部署超时 | 构建包过大 | 延长构建超时时间 |
| 健康检查失败 | API密钥错误 | 验证环境变量 |
| 冷启动问题 | 未配置预热 | 配置最小实例数 |
#!/bin/bash#!/bin/bashundefinedundefinedinstantly-webhooks-eventsinstantly-webhooks-events