Cadense

Kubernetes

使用 Helm 部署 Cadense

前置条件

  • Kubernetes 1.19+
  • Helm 3.0+
  • 支持 PV 提供程序

安装

# Clone repo
git clone https://github.com/Oppulence-Engineering/oppulence-billflowap.git && cd oppulence-billflowap

# Generate secrets
BETTER_AUTH_SECRET=$(openssl rand -hex 32)
ENCRYPTION_KEY=$(openssl rand -hex 32)
INTERNAL_API_SECRET=$(openssl rand -hex 32)

# Install
helm install billflowap ./helm/cadense \
  --set nameOverride=billflowap \
  --set app.env.BETTER_AUTH_SECRET="$BETTER_AUTH_SECRET" \
  --set app.env.ENCRYPTION_KEY="$ENCRYPTION_KEY" \
  --set app.env.INTERNAL_API_SECRET="$INTERNAL_API_SECRET" \
  --namespace billflowap --create-namespace

云特定值

helm install billflowap ./helm/cadense \
  --set nameOverride=billflowap \
  --values ./helm/cadense/examples/values-aws.yaml \
  --set nameOverride=billflowap \
  --set app.env.BETTER_AUTH_SECRET="$BETTER_AUTH_SECRET" \
  --set app.env.ENCRYPTION_KEY="$ENCRYPTION_KEY" \
  --set app.env.INTERNAL_API_SECRET="$INTERNAL_API_SECRET" \
  --set app.env.NEXT_PUBLIC_APP_URL="https://billflowap.yourdomain.com" \
  --namespace billflowap --create-namespace

关键配置

# Custom values.yaml
app:
  replicaCount: 2
  env:
    NEXT_PUBLIC_APP_URL: "https://billflowap.yourdomain.com"
    OPENAI_API_KEY: "sk-..."

postgresql:
  persistence:
    size: 50Gi

ingress:
  enabled: true
  className: nginx
  tls:
    enabled: true
  app:
    host: billflowap.yourdomain.com

查看 helm/cadense/values.yaml 了解所有选项。

外部数据库

postgresql:
  enabled: false

externalDatabase:
  enabled: true
  host: "your-db-host"
  port: 5432
  username: "postgres"
  password: "your-password"
  database: "billflowap"
  sslMode: "require"

命令

# Port forward for local access
kubectl port-forward deployment/billflowap-app 3000:3000 -n billflowap

# View logs
kubectl logs -l app.kubernetes.io/component=app -n billflowap --tail=100

# Upgrade
helm upgrade billflowap ./helm/cadense --namespace billflowap --set nameOverride=billflowap

# Uninstall
helm uninstall billflowap --namespace billflowap
On this page

On this page