Update README.md

This commit is contained in:
2025-02-26 15:25:39 +07:00
parent d6acf632e3
commit baf1723a50
69 changed files with 5525 additions and 0 deletions

307
job_spec.json Normal file
View File

@ -0,0 +1,307 @@
{
"Job": {
"Stop": false,
"Region": "global",
"Namespace": "development",
"ID": "ms-qc-db-dev",
"ParentID": "",
"Name": "ms-qc-db-dev",
"Type": "service",
"Priority": 50,
"AllAtOnce": false,
"Datacenters": [
"jm"
],
"NodePool": "default",
"Constraints": null,
"Affinities": null,
"Spreads": null,
"TaskGroups": [
{
"Name": "app",
"Count": 1,
"Update": {
"Stagger": 30000000000,
"MaxParallel": 1,
"HealthCheck": "checks",
"MinHealthyTime": 10000000000,
"HealthyDeadline": 300000000000,
"ProgressDeadline": 600000000000,
"AutoRevert": false,
"AutoPromote": false,
"Canary": 0
},
"Migrate": {
"MaxParallel": 1,
"HealthCheck": "checks",
"MinHealthyTime": 10000000000,
"HealthyDeadline": 300000000000
},
"Constraints": [
{
"LTarget": "${attr.consul.version}",
"RTarget": "\u003e= 1.8.0",
"Operand": "semver"
}
],
"Scaling": null,
"RestartPolicy": {
"Attempts": 2,
"Interval": 1800000000000,
"Delay": 15000000000,
"Mode": "fail",
"RenderTemplates": false
},
"Tasks": [
{
"Name": "ms-qc-db",
"Driver": "docker",
"User": "",
"Config": {
"command": "uvicorn",
"args": [
"app.main:app",
"--host",
"0.0.0.0",
"--port",
"8000",
"--workers",
"2",
"--proxy-headers",
"--forwarded-allow-ips",
"*"
],
"image": "registry.dev.meisheng.group/ms_qc_db:20250211",
"force_pull": true,
"ports": [
"http"
]
},
"Env": {
"PYTHONPATH": "/local/MS_QC_DB",
"LOG_LEVEL": "INFO",
"USE_SQLITE": "false"
},
"Services": null,
"Vault": null,
"Consul": null,
"Templates": [
{
"SourcePath": "",
"DestPath": "secrets/app.env",
"EmbeddedTmpl": "{{with secret \"infrastructure/nomad/msqc\"}}\nDB_USER=\"{{ .Data.data.DB_USER }}\"\nDB_PASSWORD=\"{{ .Data.data.DB_PASSWORD }}\"\nDB_HOST=\"{{ .Data.data.DB_HOST }}\"\nDB_PORT=\"{{ .Data.data.DB_PORT }}\"\nDB_NAME=\"qc_rolls_dev\"\nWEBHOOK_SECRET=\"{{ .Data.data.WEBHOOK_SECRET }}\"\n{{end}}\n",
"ChangeMode": "restart",
"ChangeSignal": "",
"ChangeScript": null,
"Splay": 5000000000,
"Perms": "0644",
"Uid": null,
"Gid": null,
"LeftDelim": "{{",
"RightDelim": "}}",
"Envvars": true,
"VaultGrace": 0,
"Wait": null,
"ErrMissingKey": false
}
],
"Constraints": null,
"Affinities": null,
"Resources": {
"CPU": 500,
"Cores": 0,
"MemoryMB": 512,
"MemoryMaxMB": 0,
"DiskMB": 0,
"IOPS": 0,
"Networks": null,
"Devices": null,
"NUMA": null
},
"RestartPolicy": {
"Attempts": 2,
"Interval": 1800000000000,
"Delay": 15000000000,
"Mode": "fail",
"RenderTemplates": false
},
"DispatchPayload": null,
"Lifecycle": null,
"Meta": null,
"KillTimeout": 5000000000,
"LogConfig": {
"MaxFiles": 10,
"MaxFileSizeMB": 10,
"Disabled": false
},
"Artifacts": [
{
"GetterSource": "git::ssh://git@gitea.service.mesh:2222/Mei_Sheng_Textiles/MS_QC_DB.git",
"GetterOptions": {
"sshkey": "LS0tLS1CRUdJTiBPUEVOU1NIIFBSSVZBVEUgS0VZLS0tLS0KYjNCbGJuTnphQzFyWlhrdGRqRUFBQUFBQkc1dmJtVUFBQUFFYm05dVpRQUFBQUFBQUFBQkFBQUFNd0FBQUF0emMyZ3RaVwpReU5UVXhPUUFBQUNENHJwM05hZXA4K2lwVnlOZXNEbEVKckE0Rlg3MXA5VW5BWmxZcEJCNDh6d0FBQUppQ1ZWczhnbFZiClBBQUFBQXR6YzJndFpXUXlOVFV4T1FBQUFDRDRycDNOYWVwOCtpcFZ5TmVzRGxFSnJBNEZYNzFwOVVuQVpsWXBCQjQ4encKQUFBRUNuckxjc1JDeUQyNmRnQ3dqdG5PUnNOK1VzUjdxZ1pqbXZpU2tVNmozalVmaXVuYzFwNm56NktsWEkxNndPVVFtcwpEZ1ZmdlduMVNjQm1WaWtFSGp6UEFBQUFFMjF6WDNGalgyUmlYMlJsY0d4dmVTQnJaWGtCQWc9PQotLS0tLUVORCBPUEVOU1NIIFBSSVZBVEUgS0VZLS0tLS0K",
"ref": "main"
},
"GetterHeaders": null,
"GetterMode": "any",
"RelativeDest": "local/MS_QC_DB"
}
],
"Leader": false,
"ShutdownDelay": 0,
"VolumeMounts": null,
"ScalingPolicies": null,
"KillSignal": "",
"Kind": "",
"CSIPluginConfig": null,
"Identity": {
"Name": "default",
"Audience": [
"nomadproject.io"
],
"ChangeMode": "",
"ChangeSignal": "",
"Env": false,
"File": false,
"ServiceName": "",
"TTL": 0
},
"Identities": null,
"Actions": null
}
],
"EphemeralDisk": {
"Sticky": false,
"SizeMB": 300,
"Migrate": false
},
"Meta": null,
"ReschedulePolicy": {
"Attempts": 0,
"Interval": 0,
"Delay": 30000000000,
"DelayFunction": "exponential",
"MaxDelay": 3600000000000,
"Unlimited": true
},
"Affinities": null,
"Spreads": null,
"Networks": [
{
"Mode": "",
"Device": "",
"CIDR": "",
"IP": "",
"Hostname": "",
"MBits": 0,
"DNS": null,
"ReservedPorts": null,
"DynamicPorts": [
{
"Label": "http",
"Value": 0,
"To": 8000,
"HostNetwork": "default"
}
]
}
],
"Consul": {
"Namespace": "",
"Cluster": "default",
"Partition": ""
},
"Services": [
{
"Name": "${NOMAD_JOB_NAME}",
"TaskName": "",
"PortLabel": "http",
"AddressMode": "auto",
"Address": "",
"EnableTagOverride": false,
"Tags": [
"traefik.http.routers.${NOMAD_JOB_NAME}.entryPoints=https",
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`dev_qc.dev.meisheng.group`)",
"traefik.http.routers.${NOMAD_JOB_NAME}.middlewares=proxyheaders@consulcatalog",
"traefik.enable=true"
],
"CanaryTags": null,
"Checks": [
{
"Name": "service: \"${NOMAD_JOB_NAME}\" check",
"Type": "http",
"Command": "",
"Args": null,
"Path": "/api/v1/health",
"Protocol": "",
"PortLabel": "http",
"Expose": false,
"AddressMode": "",
"Interval": 10000000000,
"Timeout": 2000000000,
"InitialStatus": "",
"TLSServerName": "",
"TLSSkipVerify": false,
"Method": "",
"Header": null,
"CheckRestart": null,
"GRPCService": "",
"GRPCUseTLS": false,
"TaskName": "",
"SuccessBeforePassing": 0,
"FailuresBeforeCritical": 0,
"FailuresBeforeWarning": 0,
"Body": "",
"OnUpdate": "require_healthy"
}
],
"Connect": null,
"Meta": null,
"CanaryMeta": null,
"TaggedAddresses": null,
"Namespace": "default",
"OnUpdate": "require_healthy",
"Provider": "consul",
"Cluster": "default",
"Identity": null
}
],
"Volumes": null,
"ShutdownDelay": null,
"StopAfterClientDisconnect": null,
"MaxClientDisconnect": null,
"PreventRescheduleOnLost": false
}
],
"Update": {
"Stagger": 30000000000,
"MaxParallel": 1,
"HealthCheck": "",
"MinHealthyTime": 0,
"HealthyDeadline": 0,
"ProgressDeadline": 0,
"AutoRevert": false,
"AutoPromote": false,
"Canary": 0
},
"Multiregion": null,
"Periodic": null,
"ParameterizedJob": null,
"Dispatched": false,
"DispatchIdempotencyToken": "",
"Payload": null,
"Meta": null,
"ConsulToken": "",
"ConsulNamespace": "",
"VaultToken": "",
"VaultNamespace": "",
"NomadTokenID": "",
"Status": "dead",
"StatusDescription": "",
"Stable": true,
"Version": 4,
"SubmitTime": 1740554361561458507,
"CreateIndex": 3415698,
"ModifyIndex": 3416318,
"JobModifyIndex": 3416317
}
}