File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 11ARG version=13.1
22
3- FROM plyo/postgres:database-7.3 .0-$version
3+ FROM plyo/postgres:database-8.0 .0-$version
44
55ENV S3_BACKUP_MNT_POINT "/backups"
66ENV S3_SANITIZED_BACKUP_MNT_POINT "/sanitized"
Original file line number Diff line number Diff line change @@ -22,6 +22,30 @@ backup_roles_file=${backup_file}_roles.out
2222
2323echo " starting postgres..."
2424rm -rf " ${PGDATA} "
25+
26+ cat > /var/lib/postgresql/data/postgresql.conf << EOL
27+ listen_addresses = '*'
28+ max_connections = 100
29+ shared_buffers = 128MB
30+ dynamic_shared_memory_type = posix
31+ max_wal_size = 1GB
32+ min_wal_size = 80MB
33+ log_timezone = 'UTC'
34+ lc_messages = 'en_US.utf8'
35+ lc_monetary = 'en_US.utf8'
36+ lc_numeric = 'en_US.utf8'
37+ lc_time = 'en_US.utf8'
38+ default_text_search_config = 'pg_catalog.english'
39+
40+ #pg_restore tuning
41+ work_mem = 32MB
42+ shared_buffers = 512MB
43+ maintenance_work_mem = 1GB
44+ full_page_writes = off
45+ autovacuum = off
46+ wal_buffers = 16MB
47+ EOL
48+
2549/usr/local/bin/docker-entrypoint.sh postgres &
2650
2751until pg_isready -U postgres -h 0.0.0.0 -p 5432 ; do echo " waiting for postgres to start" && sleep 5 ; done
@@ -61,7 +85,7 @@ if [[ ! -f "/files/${filename}" ]]; then
6185fi
6286log " Restoring '${backup_file} '..."
6387log " pg_restore /files/${filename} "
64- pg_restore " /files/${filename} " -U postgres -d ${DB_NAME} -v
88+ pg_restore " /files/${filename} " -U postgres -d ${DB_NAME} --jobs=4 - v
6589status=$?
6690if [ " $status " != " 0" ];
6791then
You can’t perform that action at this time.
0 commit comments