chore: 并入 iotlcm-openapi 历史到 openapi/(原提交 3b05d5a)

This commit is contained in:
MiFaZhan
2026-11-02 13:28:02 +08:00
484 changed files with 34732 additions and 0 deletions
@@ -0,0 +1,76 @@
system:
name: "IotLCM-OpenAPI"
version: "1.0"
description: "IotLCM OpenAPI Service"
gfmode: "dev"
server:
address: ":8000"
openapiPath: "/api.json"
swaggerPath: "/swagger"
maxHeaderBytes: "20KB"
clientMaxBodySize: "200MB"
readTimeout: "20m"
writeTimeout: "20m"
logger:
path: "/app/logs"
file: "{Y-m-d-H}.log"
level: "dev"
timeFormat: "2006-01-02T15:04:05"
stdout: true
header: true
jwt:
signingKey: "${JWT_SIGNING_KEY}"
expiresTime: "7d"
bufferTime: "1d"
issuer: "iotlcm"
database:
logger:
path: "/app/logs/sql"
level: "all"
stdout: true
default:
link: "${DB_DSN}"
debug: true
charset: "utf8mb4"
dryRun: false
maxIdle: 30
maxOpen: 100
maxLifetime: 120
cache:
adapter: "redis"
fileDir: "resource/cache"
redis:
default:
mode: "single"
sentinelMasterName: "iotlcm-master"
address: "127.0.0.1:6379"
db: 0
pass: "${SERVICE_PASSWORD}"
minIdle: 5
maxIdle: 30
maxActive: 5000
idleTimeout: "60s"
ClientName: "OpenAPICache"
router:
exceptLogin:
- /openapi/v3/query/token
- /openapi/v3/query/operator-token
upstream:
proxy:
address: "localhost:8510"
timeout: "10s"
gateway:
address: "localhost:8110"
timeout: "10s"
rabbitmq:
enabled: true
dsn: "${SERVICE_DSN}"
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: template-single
labels:
app: template-single
spec:
replicas: 1
selector:
matchLabels:
app: template-single
template:
metadata:
labels:
app: template-single
spec:
containers:
- name : main
image: template-single
imagePullPolicy: Always
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: template-single
spec:
ports:
- port: 80
protocol: TCP
targetPort: 8000
selector:
app: template-single
@@ -0,0 +1,14 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: template-single-configmap
data:
config.yaml: |
server:
address: ":8000"
openapiPath: "/api.json"
swaggerPath: "/swagger"
logger:
level : "all"
stdout: true
@@ -0,0 +1,10 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: template-single
spec:
template:
spec:
containers:
- name : main
image: template-single:develop
@@ -0,0 +1,14 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
- configmap.yaml
patchesStrategicMerge:
- deployment.yaml
namespace: default
+18
View File
@@ -0,0 +1,18 @@
ARG BASE_REGISTRY=docker.io/library
FROM ${BASE_REGISTRY}/alpine:3.23
RUN apk add --no-cache ca-certificates tzdata
###############################################################################
# INSTALLATION
###############################################################################
ENV WORKDIR /app
ADD resource $WORKDIR/
ADD ./temp/linux_amd64/main $WORKDIR/main
RUN chmod +x $WORKDIR/main
###############################################################################
# START
###############################################################################
WORKDIR $WORKDIR
CMD ./main
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
# This shell is executed before docker build.
View File