Merge pull request 'feat(docker-compose): add observability labels and logging configuration for services' (#34) from develop into main
Deploy Production / deploy (push) Successful in 1m7s
Deploy Production / deploy (push) Successful in 1m7s
Reviewed-on: sakibcc/zhixing-system#34
This commit was merged in pull request #34.
This commit is contained in:
@@ -1,7 +1,22 @@
|
|||||||
name: ${COMPOSE_PROJECT_NAME:-zhixing-system}
|
name: ${COMPOSE_PROJECT_NAME:-zhixing-system}
|
||||||
|
|
||||||
|
x-observability-labels: &observability-labels
|
||||||
|
observability.logs: "true"
|
||||||
|
observability.project: "zhixing-system"
|
||||||
|
observability.env: "production"
|
||||||
|
|
||||||
|
x-container-logging: &container-logging
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "20m"
|
||||||
|
max-file: "5"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
server:
|
server:
|
||||||
|
labels:
|
||||||
|
<<: *observability-labels
|
||||||
|
observability.service: "server"
|
||||||
|
logging: *container-logging
|
||||||
build:
|
build:
|
||||||
context: ./zhixing-server
|
context: ./zhixing-server
|
||||||
target: production
|
target: production
|
||||||
@@ -47,6 +62,10 @@ services:
|
|||||||
- 1panel-network
|
- 1panel-network
|
||||||
|
|
||||||
web:
|
web:
|
||||||
|
labels:
|
||||||
|
<<: *observability-labels
|
||||||
|
observability.service: "web"
|
||||||
|
logging: *container-logging
|
||||||
build:
|
build:
|
||||||
context: ./zhixing-web
|
context: ./zhixing-web
|
||||||
target: production
|
target: production
|
||||||
@@ -62,6 +81,10 @@ services:
|
|||||||
- "127.0.0.1:${ZHIXING_WEB_PORT:-8111}:80"
|
- "127.0.0.1:${ZHIXING_WEB_PORT:-8111}:80"
|
||||||
|
|
||||||
migrate:
|
migrate:
|
||||||
|
labels:
|
||||||
|
<<: *observability-labels
|
||||||
|
observability.service: "migrate"
|
||||||
|
logging: *container-logging
|
||||||
profiles: ["jobs"]
|
profiles: ["jobs"]
|
||||||
build:
|
build:
|
||||||
context: ./zhixing-server
|
context: ./zhixing-server
|
||||||
@@ -78,6 +101,10 @@ services:
|
|||||||
|
|
||||||
# Named volumes are initialized as root; normalize ownership before app jobs run.
|
# Named volumes are initialized as root; normalize ownership before app jobs run.
|
||||||
market-data-init:
|
market-data-init:
|
||||||
|
labels:
|
||||||
|
<<: *observability-labels
|
||||||
|
observability.service: "market-data-init"
|
||||||
|
logging: *container-logging
|
||||||
profiles: ["jobs"]
|
profiles: ["jobs"]
|
||||||
build:
|
build:
|
||||||
context: ./zhixing-server
|
context: ./zhixing-server
|
||||||
@@ -93,6 +120,10 @@ services:
|
|||||||
- market-data:/app/data/market-data
|
- market-data:/app/data/market-data
|
||||||
|
|
||||||
market-sync:
|
market-sync:
|
||||||
|
labels:
|
||||||
|
<<: *observability-labels
|
||||||
|
observability.service: "market-sync"
|
||||||
|
logging: *container-logging
|
||||||
profiles: ["jobs"]
|
profiles: ["jobs"]
|
||||||
build:
|
build:
|
||||||
context: ./zhixing-server
|
context: ./zhixing-server
|
||||||
@@ -118,6 +149,10 @@ services:
|
|||||||
- 1panel-network
|
- 1panel-network
|
||||||
|
|
||||||
sector-radar-build:
|
sector-radar-build:
|
||||||
|
labels:
|
||||||
|
<<: *observability-labels
|
||||||
|
observability.service: "sector-radar-build"
|
||||||
|
logging: *container-logging
|
||||||
profiles: ["jobs"]
|
profiles: ["jobs"]
|
||||||
build:
|
build:
|
||||||
context: ./zhixing-server
|
context: ./zhixing-server
|
||||||
|
|||||||
Reference in New Issue
Block a user