feat(observability): add observability labels and logging configuration for backend, migrate, and web services
Deploy production / deploy (push) Successful in 22s
Deploy production / deploy (push) Successful in 22s
This commit is contained in:
@@ -1,6 +1,17 @@
|
||||
# Independent production configuration; do not merge with compose.yaml.
|
||||
name: wq-alpha-production
|
||||
|
||||
x-observability-labels: &observability-labels
|
||||
observability.logs: "true"
|
||||
observability.project: "wq-alpha"
|
||||
observability.env: "production"
|
||||
|
||||
x-container-logging: &container-logging
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "20m"
|
||||
max-file: "5"
|
||||
|
||||
x-backend: &backend
|
||||
image: wq-alpha-production-backend:${DEPLOY_TAG:-local}
|
||||
build:
|
||||
@@ -28,6 +39,10 @@ x-backend: &backend
|
||||
services:
|
||||
backend:
|
||||
<<: *backend
|
||||
labels:
|
||||
<<: *observability-labels
|
||||
observability.service: "backend"
|
||||
logging: *container-logging
|
||||
# Migration is run separately with all application writers stopped.
|
||||
command: [uvicorn, 'app.main:create_app', --factory, --host, 0.0.0.0, --port, '8000', --workers, '1', --proxy-headers]
|
||||
healthcheck:
|
||||
@@ -40,10 +55,18 @@ services:
|
||||
restart: unless-stopped
|
||||
migrate:
|
||||
<<: *backend
|
||||
labels:
|
||||
<<: *observability-labels
|
||||
observability.service: "migrate"
|
||||
logging: *container-logging
|
||||
profiles: [jobs]
|
||||
command: [alembic, upgrade, head]
|
||||
restart: 'no'
|
||||
web:
|
||||
labels:
|
||||
<<: *observability-labels
|
||||
observability.service: "web"
|
||||
logging: *container-logging
|
||||
image: wq-alpha-production-web:${DEPLOY_TAG:-local}
|
||||
build:
|
||||
context: .
|
||||
|
||||
Reference in New Issue
Block a user