forked from emperorhan/postgres-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
29 lines (29 loc) · 1.56 KB
/
docker-compose.yml
File metadata and controls
29 lines (29 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: '3'
services:
postgres:
# image: postgres:13.1
container_name: postgres
build:
dockerfile: Dockerfile
context: ./postgres
ports:
- "${POSTGRES_PORT}:5432"
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ./postgres/conf/postgresql.conf:/tmp/postgresql.conf
- ./postgres/${POSTGRES_VOLUME}:/var/lib/postgresql/data/pgdata
# command: "postgres -c config_file=/tmp/postgres.conf"
# command: "postgres -c max_connections=${MAX_CONNECTIONS} -c shared_buffers=${SHARED_BUFFERS} -c effective_cache_size=${EFFECTIVE_CACHE_SIZE} -c maintenance_work_mem=${MAINTENANCE_WORK_MEM} -c checkpoint_completion_target=${CHECKPOINT_COMPLETION_TARGET} -c wal_buffers=${WAL_BUFFERS} -c default_statistics_target=${DEFAULT_STATISTICS_TARGET} -c random_page_cost=${RANDOM_PAGE_COST} -c effective_io_concurrency=${EFFECTIVE_IO_CONCURRENCY} -c work_mem=${WORK_MEM} -c min_wal_size=${MIN_WAL_SIZE} -c max_wal_size=${MAX_WAL_SIZE} -c max_worker_processes=${MAX_WORKER_PROCESSES} -c max_parallel_workers_per_gather=${MAX_PARALLEL_WORKERS_PER_GATHER} -c max_parallel_workers=${MAX_PARALLEL_WORKERS} -c max_parallel_maintenance_workers=${MAX_PARALLEL_MAINTENANCE_WORKERS}"
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
depends_on:
- postgres
ports:
- "${PGADMIN_PORT}:80"
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}