2024-07-27 10:18:07 +02:00
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgres-with-contrib:15.5-bookworm
|
|
|
|
container_name: custom-postgres
|
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: password
|
|
|
|
volumes:
|
2024-08-12 12:06:12 +02:00
|
|
|
- ./postgresql-log-slow-queries.conf:/etc/postgresql/postgresql.conf
|
2024-07-27 10:18:07 +02:00
|
|
|
ports:
|
|
|
|
- "5432:5432"
|
|
|
|
command:
|
|
|
|
- bash
|
|
|
|
- -c
|
|
|
|
- >
|
|
|
|
apt-get update &&
|
|
|
|
apt-get install -y postgresql-contrib &&
|
|
|
|
docker-entrypoint.sh postgres -c config_file=/etc/postgresql/postgresql.conf
|
2024-08-12 12:06:12 +02:00
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpus: '2'
|
|
|
|
memory: 8G
|
|
|
|
reservations:
|
|
|
|
cpus: '1'
|
|
|
|
memory: 2G
|