mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-28 11:25:00 +00:00
* docs: simplify runtime script usage Unify to use runtime.sh for all deployment commands, removing the distinction between "official images" and "Aliyun mirror". The --aliyun parameter is preserved for users in China to specify the mirror. Changes: - Remove runtime-github.sh references, use runtime.sh uniformly - Default command uses GHCR images - Add --aliyun parameter for China users - Update README.md, README_zh.md, and docs/skillhub/ quickstart files * docs: consolidate documentation links with clear descriptions Merge the two documentation links into a single "Documentation" section with clear descriptions of each: - User Guide: skill publishing, search, CLI usage - Developer Docs: architecture, API reference, deployment This makes it easier for users to find the right documentation. * docs: consolidate documentation links with clear descriptions Merge the two documentation links into a single "Documentation" section with clear descriptions of each: - User Guide: skill publishing, search, CLI usage - Developer Docs: architecture, API reference, deployment This makes it easier for users to find the right documentation. * fix: include --home parameter in shutdown command When starting with a custom --home directory, the generated shutdown command now includes the same --home parameter to ensure it can find the correct compose files. * docs: add Kubernetes deployment guide with overlays structure - Restructure k8s configs with base/overlays pattern for flexibility - Add overlays/with-infra for full deployment (PostgreSQL + Redis) - Add overlays/external for external database scenarios - Add comprehensive ConfigMap with bootstrap admin settings - Fix health check path to /actuator/health (auth issue) - Add SKILLHUB_API_UPSTREAM env for frontend - Set SESSION_COOKIE_SECURE=false for HTTP environments - Add Chinese and English documentation in docs/skillhub/ * docs: update k8s README with complete config reference
160 lines
5 KiB
YAML
160 lines
5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: skillhub-server
|
|
labels:
|
|
app.kubernetes.io/name: skillhub-server
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: skillhub-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: skillhub-server
|
|
spec:
|
|
containers:
|
|
- name: server
|
|
image: ghcr.io/iflytek/skillhub-server:edge
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
env:
|
|
- name: SPRING_PROFILES_ACTIVE
|
|
value: docker
|
|
|
|
# Database
|
|
- name: SPRING_DATASOURCE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: skillhub-secret
|
|
key: spring-datasource-url
|
|
- name: SPRING_DATASOURCE_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: skillhub-secret
|
|
key: spring-datasource-username
|
|
- name: SPRING_DATASOURCE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: skillhub-secret
|
|
key: spring-datasource-password
|
|
|
|
# Redis
|
|
- name: SPRING_DATA_REDIS_HOST
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: redis-host
|
|
- name: SPRING_DATA_REDIS_PORT
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: redis-port
|
|
|
|
# Storage
|
|
- name: STORAGE_BASE_PATH
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: storage-base-path
|
|
- name: SKILLHUB_STORAGE_PROVIDER
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: skillhub-storage-provider
|
|
|
|
# Scanner
|
|
- name: SKILLHUB_SECURITY_SCANNER_ENABLED
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: skill-scanner-enabled
|
|
- name: SKILLHUB_SECURITY_SCANNER_URL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: skill-scanner-url
|
|
- name: SKILLHUB_SECURITY_SCANNER_MODE
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: skill-scanner-mode
|
|
|
|
# Session
|
|
- name: SESSION_COOKIE_SECURE
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: session-cookie-secure
|
|
|
|
# Bootstrap Admin (non-sensitive from ConfigMap)
|
|
- name: BOOTSTRAP_ADMIN_ENABLED
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: bootstrap-admin-enabled
|
|
- name: BOOTSTRAP_ADMIN_USER_ID
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: bootstrap-admin-user-id
|
|
- name: BOOTSTRAP_ADMIN_USERNAME
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: bootstrap-admin-username
|
|
- name: BOOTSTRAP_ADMIN_DISPLAY_NAME
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: bootstrap-admin-display-name
|
|
- name: BOOTSTRAP_ADMIN_EMAIL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: skillhub-config
|
|
key: bootstrap-admin-email
|
|
|
|
# Bootstrap Admin Password (sensitive from Secret)
|
|
- name: BOOTSTRAP_ADMIN_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: skillhub-secret
|
|
key: bootstrap-admin-password
|
|
optional: true
|
|
|
|
# OAuth2 GitHub (optional)
|
|
- name: OAUTH2_GITHUB_CLIENT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: skillhub-secret
|
|
key: oauth2-github-client-id
|
|
optional: true
|
|
- name: OAUTH2_GITHUB_CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: skillhub-secret
|
|
key: oauth2-github-client-secret
|
|
optional: true
|
|
|
|
volumeMounts:
|
|
- name: skillhub-storage
|
|
mountPath: /var/lib/skillhub/storage
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /actuator/health
|
|
port: http
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /actuator/health
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 15
|
|
volumes:
|
|
- name: skillhub-storage
|
|
persistentVolumeClaim:
|
|
claimName: skillhub-storage-pvc
|