myos/stack/postgres/postgres.local.yml

25 lines
700 B
YAML

version: '3.6'
services:
postgres:
command: -c logging_collector=on -c log_destination='stderr' -c log_directory='/shared/logs/postgres' -c log_filename='postgresql.log' -c log_file_mode='0644' -c log_rotation_age=0 -c log_checkpoints=on -c log_hostname=on -c log_line_prefix='%t [%p] [%l-1] db=%d,user=%u '
depends_on:
- shared-logs
ports:
- 5432:5432
volumes:
- shared:/shared
shared-logs:
command: sh -c 'mkdir -p /shared/logs/postgres && chown 70:70 /shared/logs/postgres'
image: alpine:latest
volumes:
- shared:/shared
volumes:
shared:
driver: local
driver_opts:
type: none
device: ${MONOREPO_DIR}/shared
o: bind