[Postgre] Make use of labels for monitoring + bump to last minor version

This commit is contained in:
thopic 2023-05-26 17:06:36 +02:00
parent 55f7548231
commit feff23c679
Signed by: thopic
GPG Key ID: 292DBBF0B54AD4C5
3 changed files with 11 additions and 3 deletions

View File

@ -33,13 +33,15 @@ services:
- "traefik.http.routers.gitea.rule=Host(`${CN}`)" - "traefik.http.routers.gitea.rule=Host(`${CN}`)"
db: db:
image: postgres:13.5 image: postgres:13.11-alpine
env_file: ./secrets/db.secrets env_file: ./secrets/db.secrets
restart: unless-stopped restart: unless-stopped
command: ["postgres", "-c", "log_statement=all", "-c", "logging_collector=on"]
volumes: volumes:
- ${DATA_PATH}/db/data:/var/lib/postgresql/data - ${DATA_PATH}/db/data:/var/lib/postgresql/data
- ${DATA_PATH}/db/.pgpass:/root/.pgpass - ${DATA_PATH}/db/.pgpass:/root/.pgpass
labels:
- "co.elastic.logs/module=postgresql"
- "co.elastic.logs/fileset=log"
networks: networks:
proxy: proxy:

View File

@ -43,6 +43,9 @@ services:
volumes: volumes:
- ${DATA_PATH}/db/data:/var/lib/postgresql/data - ${DATA_PATH}/db/data:/var/lib/postgresql/data
- ${DATA_PATH}/db/.pgpass:/root/.pgpass - ${DATA_PATH}/db/.pgpass:/root/.pgpass
labels:
- "co.elastic.logs/module=postgresql"
- "co.elastic.logs/fileset=log"
networks: networks:
proxy: proxy:

View File

@ -2,13 +2,16 @@ version: "3.8"
services: services:
db: db:
image: postgres:12.9-alpine image: postgres:12.15-alpine
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ${DATA_PATH}/db/var/lib/postgresql/data:/var/lib/postgresql/data - ${DATA_PATH}/db/var/lib/postgresql/data:/var/lib/postgresql/data
- ${DATA_PATH}/db/.pgpass:/root/.pgpass - ${DATA_PATH}/db/.pgpass:/root/.pgpass
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
env_file: secrets/db.secrets env_file: secrets/db.secrets
labels:
- "co.elastic.logs/module=postgresql"
- "co.elastic.logs/fileset=log"
app: app:
image: mm_app:7.9.1 image: mm_app:7.9.1