Compare commits
3 Commits
d29693343b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 2500cce6d4 | |||
| c423211cb6 | |||
| d2ba827829 |
@@ -15,9 +15,9 @@ MicroService:
|
|||||||
- files.ping.hello
|
- files.ping.hello
|
||||||
|
|
||||||
ServiceClients:
|
ServiceClients:
|
||||||
assets: ops-assets
|
assets: ${ASSETS_FILES_SECRET}
|
||||||
dc-control: ops-dc-control
|
dc-control: ${DC_CONTROL_FILES_SECRET}
|
||||||
visual: ops-visual
|
visual: ${VISUAL_FILES_SECRET}
|
||||||
|
|
||||||
ObjectStorage:
|
ObjectStorage:
|
||||||
Provider: aliyun
|
Provider: aliyun
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ MicroService:
|
|||||||
- files.ping.hello
|
- files.ping.hello
|
||||||
|
|
||||||
ServiceClients:
|
ServiceClients:
|
||||||
assets: ops-assets
|
assets: ${ASSETS_FILES_SECRET}
|
||||||
dc-control: ops-dc-control
|
dc-control: ${DC_CONTROL_FILES_SECRET}
|
||||||
visual: ops-visual
|
visual: ${VISUAL_FILES_SECRET}
|
||||||
|
|
||||||
ObjectStorage:
|
ObjectStorage:
|
||||||
Provider: aliyun
|
Provider: aliyun
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ MicroService:
|
|||||||
- files.ping.hello
|
- files.ping.hello
|
||||||
|
|
||||||
ServiceClients:
|
ServiceClients:
|
||||||
assets: ops-assets
|
assets: ${ASSETS_FILES_SECRET}
|
||||||
dc-control: ops-dc-control
|
dc-control: ${DC_CONTROL_FILES_SECRET}
|
||||||
visual: ops-visual
|
visual: ${VISUAL_FILES_SECRET}
|
||||||
|
|
||||||
ObjectStorage:
|
ObjectStorage:
|
||||||
Provider: aliyun
|
Provider: aliyun
|
||||||
|
|||||||
@@ -1,14 +1,28 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Files Service
|
Description=OPS Files Service
|
||||||
After=network.target
|
Wants=network-online.target
|
||||||
|
Requires=ops-visual.service
|
||||||
|
After=network-online.target ops-visual.service
|
||||||
|
PartOf=ops-stack.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=ops
|
WorkingDirectory=/data/app
|
||||||
WorkingDirectory=/opt/ops/files
|
EnvironmentFile=/data/app/etc/ops.env
|
||||||
ExecStart=/opt/ops/files/ops-files
|
Environment=BSM_RuntimeMode=prod
|
||||||
|
Environment=RUN_MODE=prod
|
||||||
|
Environment=BSM_Prefix=/data/app
|
||||||
|
ExecStart=/data/app/ops-files
|
||||||
|
ExecStartPost=/data/app/systemd/wait-http.sh ops-files http://127.0.0.1:12452/Files/v1/ping/hello 60
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5s
|
RestartSec=5s
|
||||||
|
TimeoutStartSec=75s
|
||||||
|
TimeoutStopSec=30s
|
||||||
|
KillSignal=SIGTERM
|
||||||
|
StandardOutput=journal
|
||||||
|
StandardError=journal
|
||||||
|
SyslogIdentifier=ops-files
|
||||||
|
LimitNOFILE=1048576
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=ops-stack.target
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ func CompleteUpload(ctx *gin.Context) {
|
|||||||
Updates(map[string]any{
|
Updates(map[string]any{
|
||||||
"status": models.FileStatusReady,
|
"status": models.FileStatusReady,
|
||||||
"actual_size": objectInfo.Size,
|
"actual_size": objectInfo.Size,
|
||||||
"etag": objectInfo.ETag,
|
"e_tag": objectInfo.ETag,
|
||||||
"completed_at": completedAt,
|
"completed_at": completedAt,
|
||||||
})
|
})
|
||||||
if result.Error != nil {
|
if result.Error != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user