version: "3" services: postgres: # image: ${postgres_old_image} build: context: . dockerfile: postgres/Dockerfile args: POSTGRES_IMAGE: ${postgres_image} network_mode: host volumes: - pgdata:/pgdata - ../sql/create_databases.sql:/docker-entrypoint-initdb.d/create_databases.sql - ../sql/stats_refresher.sql:/docker-entrypoint-initdb.d/stats_refresher.sql - ./postgres/update_pg_hba_file.sh:/docker-entrypoint-initdb.d/update_pg_hba_file.sh environment: - POSTGRES_PASSWORD=${DATABASE_PASSWORD} - PGDATA=/pgdata logging: driver: "json-file" options: max-size: "20000k" max-file: "1" # command: postgres -c wal_level=logical -c max_wal_senders=5 -c max_replication_slots=5 command: > postgres -c wal_level=logical -c max_wal_senders=5 -c max_replication_slots=5 -c shared_preload_libraries=pg_cron -c cron.database_name=postgres volumes: pgdata: