mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
chore(server): add stripe env
This commit is contained in:
4
.github/actions/deploy/deploy.mjs
vendored
4
.github/actions/deploy/deploy.mjs
vendored
@@ -25,6 +25,8 @@ const {
|
|||||||
GCLOUD_CLOUD_SQL_INTERNAL_ENDPOINT,
|
GCLOUD_CLOUD_SQL_INTERNAL_ENDPOINT,
|
||||||
REDIS_HOST,
|
REDIS_HOST,
|
||||||
REDIS_PASSWORD,
|
REDIS_PASSWORD,
|
||||||
|
STRIPE_API_KEY,
|
||||||
|
STRIPE_WEBHOOK_KEY,
|
||||||
} = process.env;
|
} = process.env;
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
@@ -96,6 +98,8 @@ const createHelmCommand = ({ isDryRun }) => {
|
|||||||
`--set-string graphql.app.oauth.google.enabled=true`,
|
`--set-string graphql.app.oauth.google.enabled=true`,
|
||||||
`--set-string graphql.app.oauth.google.clientId="${AFFINE_GOOGLE_CLIENT_ID}"`,
|
`--set-string graphql.app.oauth.google.clientId="${AFFINE_GOOGLE_CLIENT_ID}"`,
|
||||||
`--set-string graphql.app.oauth.google.clientSecret="${AFFINE_GOOGLE_CLIENT_SECRET}"`,
|
`--set-string graphql.app.oauth.google.clientSecret="${AFFINE_GOOGLE_CLIENT_SECRET}"`,
|
||||||
|
`--set-string graphql.app.payment.stripe.apiKey="${STRIPE_API_KEY}"`,
|
||||||
|
`--set-string graphql.app.payment.stripe.webhookKey="${STRIPE_WEBHOOK_KEY}"`,
|
||||||
`--set graphql.app.experimental.enableJwstCodec=true`,
|
`--set graphql.app.experimental.enableJwstCodec=true`,
|
||||||
`--set sync.replicaCount=${syncReplicaCount}`,
|
`--set sync.replicaCount=${syncReplicaCount}`,
|
||||||
`--set-string sync.image.tag="${imageTag}"`,
|
`--set-string sync.image.tag="${imageTag}"`,
|
||||||
|
|||||||
@@ -100,6 +100,16 @@ spec:
|
|||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: "{{ .Values.app.oauth.email.secretName }}"
|
name: "{{ .Values.app.oauth.email.secretName }}"
|
||||||
key: password
|
key: password
|
||||||
|
- name: STRIPE_API_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Values.app.payment.stripe.secretName }}"
|
||||||
|
key: stripeAPIKey
|
||||||
|
- name: STRIPE_WEBHOOK_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: "{{ .Values.app.payment.stripe.secretName }}"
|
||||||
|
key: stripeWebhookKey
|
||||||
- name: DOC_MERGE_INTERVAL
|
- name: DOC_MERGE_INTERVAL
|
||||||
value: "{{ .Values.app.doc.mergeInterval }}"
|
value: "{{ .Values.app.doc.mergeInterval }}"
|
||||||
{{ if .Values.app.experimental.enableJwstCodec }}
|
{{ if .Values.app.experimental.enableJwstCodec }}
|
||||||
|
|||||||
8
.github/helm/affine/charts/graphql/templates/payment.yml
vendored
Normal file
8
.github/helm/affine/charts/graphql/templates/payment.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: "{{ .Values.app.payment.stripe.secretName }}"
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
stripeAPIKey: "{{ .Values.app.payment.stripe.apiKey | b64enc }}"
|
||||||
|
stripeWebhookKey: "{{ .Values.app.payment.stripe.webhookKey | b64enc }}"
|
||||||
@@ -53,6 +53,11 @@ app:
|
|||||||
secretName: oauth-github
|
secretName: oauth-github
|
||||||
clientId: ''
|
clientId: ''
|
||||||
clientSecret: ''
|
clientSecret: ''
|
||||||
|
payment:
|
||||||
|
stripe:
|
||||||
|
secretName: 'stripe'
|
||||||
|
apiKey: ''
|
||||||
|
webhookKey: ''
|
||||||
|
|
||||||
serviceAccount:
|
serviceAccount:
|
||||||
create: true
|
create: true
|
||||||
|
|||||||
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@@ -247,3 +247,5 @@ jobs:
|
|||||||
REDIS_HOST: ${{ secrets.REDIS_HOST }}
|
REDIS_HOST: ${{ secrets.REDIS_HOST }}
|
||||||
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
|
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
|
||||||
CLOUD_SQL_IAM_ACCOUNT: ${{ secrets.CLOUD_SQL_IAM_ACCOUNT }}
|
CLOUD_SQL_IAM_ACCOUNT: ${{ secrets.CLOUD_SQL_IAM_ACCOUNT }}
|
||||||
|
STRIPE_API_KEY: ${{ secrets.STRIPE_API_KEY }}
|
||||||
|
STRIPE_WEBHOOK_KEY: ${{ secrets.STRIPE_WEBHOOK_KEY }}
|
||||||
|
|||||||
Reference in New Issue
Block a user